Page 1 of 1

Delphi7 Input form

Posted: Wed 24 Aug 2005 20:19
by Hans
Hi,

I created a Form using some edit controls (DBEdit) connected to a TMyTable via a datasource. I call ClearFields to start with a blank form and want to be able to search the database for records containing the data I entered in one or more editfields. I want than be able to select one record an fill in the form.

After I have choosen the record I use the Locate function to select the record which should fill in the edit fields in my form. But, I get an error about some foreign key. I guess it is because the component thinks I am editting an existing record. When I call disablecontrols first it seems to work, but I feel this is not the wright way to do.

Does anyone of you know a better way to accomplish this?

best regards,
Hans

Posted: Thu 25 Aug 2005 11:48
by Ikar
> I guess it is because the component thinks I am editting an existing record.

DBEdit serves to edit the current record. Use another component instead.