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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick data input to Paradox

Status
Not open for further replies.

PALman

Technical User
May 15, 2002
160
GB
I have a database, which holds information about different machine models. To save time in data input I wish to have fixed (known) data inserted into certain fields depending on which Model is typed into the model field. I have tried this using Tcursor but this only works for the first occurrence of a particular model and then resets itself each time with the command to open the Tcursor. I need to have this carried out on the active record/model field. Any ideas?
 
Palman,

Sounds like a job for a lookup table set to fill all corresponding fields. If you design the lookup so it shares the same field names and types you're using in the data table, Paradox will bring over the model number and any default values stored in the in the lookup table.

Hope this helps...

-- Lance
 
Thanks footpad, I shall give it a try. I had thought it could have been handled using "depart" when leaving the model field.
 
PalMan,

Footpad's lookup table solution is probably the simplest. However, I tend to agree with your TCursor approach also.
The only danger is that this would run every time a depart event occured perhaps ChangeValue woud be better.

On changeValue could your TCursor not

i. Scan your table of Models for the Model that is the same as Self.value (the current model that has just been entered or changed)
ii. then populate each of the necessary fields with the corresponding TCursor value.

Regards

Bystander
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top