Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data verify

Status
Not open for further replies.

GaryWilsonCPA

Technical User
Joined
Jul 19, 2000
Messages
253
Location
US

I want the data in one table to be verified by data in another table. I want to verify that the "customer id" entered in the transaction table must actually exist in the customer table.

Is this an expression used on the form or can I have a lookup table in the sales table (similar to access)

 
Hi
There are many ways...

1. In the Valid event of the textbox in which you accept the code... you can put the code to verify if that code is present in the master and then return .t. or. return .f.(you cannot exit that textbox)
2. You can have a lookup table of masters which can be built as a combo.. so that the user can pick the account code.
3. You can activate a grid of masters... when the user starts input in this text box... and do a seek search in that grid for incremental search of what is keyed or accept the code on which clicked.

There can be more ways of doing the same.. just only you have to decide what you want.

I suggest method 3 for its easy trasparency and control over large data base.

Hope this helps :-) ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :-)
 
What I usually do, is to make a business object that handles my data.

In this business object (in my case an invisible toolbar (because of its private datasession)) I implemented a locate function that locates a value for a given field.
If the location of the record fails, it means that the code is invalid, if it is sucesful it exists.
Since this is a genral handling method, I implemented it in a baseclass so that I can subclass it for every business object.

This is very handy to do, since this does not require any programming in the user interface, concerning data handling.

What I usually do is to validate the data on record level as well as on field level, especially with lookup fields.

If the value is incorrect, a popup will appear, if the user cancels, the value stays and the validated is validated again when the record is saved, and if the value is incorrect, the user should enter another.

Hope this will give yu some insight on the problem.

See my CrownBase app for the implementation for the things I just described.

Cheers,

Weedz (Wietze Veld)
My private project:Download the CrownBase source code !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top