I have a form whereby I want to enable a search feature. I have two edit boxes one to search by surname and one to search by employee number. The remainder of the fields on the form are dbedits which look at a database and display the appropriate results.
Is there a way to have the dbedits start off empty and allow a user to enter the search criteria or will I have to use regular edit fields. I have tried disabling the Datasource i.e.
Datasource.enabled := false
this seems to work but an error noise is made when the form is displayed suggesting something is wrong. Maybe a solution is to link the fields to the database after the form has been displayed but this seems like a lot of code for what I want to do which is start with the fields empty. When the search results are returned the dbedit fields should be returned with the data from the query.
Secondly when the datasource is disabled I cannot enter any search criteria in a dbedit field is this possible or do I need to change this to an edit field not linked to the database??
Hope this makes sense