I have odbc linked tables in my database. I have a form and i have found
that if i bind an odbc data source to the form (with lost of records in it)
it takes forever to open. therefore, i want to be able to place fields on
the form, enter desired data into these fields and click search, and then
form populates with the required data in a list box. (on the same form).
the search fields and type on the form header are:
txtStartDate formated as date/time
txtEndDate formated as date/time
Status x3 radio buttons -'Complete' or 'Incomplete' or 'All'
and then a button cmdSearch
Displayed columns in the list box (in form details):
sql for list box is as follows: (but now needs to reflect the above search
SELECT TblPatients.PatRecID, TblDispatch.DispatchID,
TblDispatch.DispatchDate, TblDispatch.DispatchAddress, TblDispatch.City,
TblPatients.LastName, TblPatients.FirstName, TblPatients.Age,
TblPatients.ChiefComplaint, TblPatients.Support, TblDispatch.DispatchType,
FROM TblDispatch INNER JOIN TblPatients ON TblDispatch.DispatchID =
WHERE (((TblDispatch.DispatchType)="completed als call" Or
(TblDispatch.DispatchType)="released to bls"));
I really need help with how to code the 'search' button when clicked.
Is there a utility out that allows this to be done automatically?
Thanks in advanced