A database with a search form that allows the user to enter multiple criteria and then retrieve the matching records using a "Search" button.
Open the form frmSearch and enter criteria in the appropriate fields then hit search (enter just a few or you may get no records).
A variety of search rules (text, numeric, look up) are included for illustration purposes.
Search rules:
a) Lastname, Firstname - Search code used the LIKE keyword and automatically appends a trailing * for wildcards
b) Min age, max age - Search is strictly greater than and less than the values
c) CompanyID, CountryID - Queries for the combo boxes include a UNION so that "<all>" is included as an option. This UNION statement requires the tblzNull table.
d) Color - Multiselect list box uses OR to search for any of the chosen colors. The listbox uses a query on the Clients table to determine the list of colors presented.
- gromit
Open the form frmSearch and enter criteria in the appropriate fields then hit search (enter just a few or you may get no records).
A variety of search rules (text, numeric, look up) are included for illustration purposes.
Search rules:
a) Lastname, Firstname - Search code used the LIKE keyword and automatically appends a trailing * for wildcards
b) Min age, max age - Search is strictly greater than and less than the values
c) CompanyID, CountryID - Queries for the combo boxes include a UNION so that "<all>" is included as an option. This UNION statement requires the tblzNull table.
d) Color - Multiselect list box uses OR to search for any of the chosen colors. The listbox uses a query on the Clients table to determine the list of colors presented.
- gromit