First, we've set up the form which displays the Customer records. The user can click on the Search button to perform a search on any text field in the Customers table.
When the Search button is pressed, the following form will appear:
The user can select the field to search on and the search criteria. In this example, we've selected the "CompanyName" field and "store" as the value to search for in the "CompanyName" field.
When the Search button is pressed, the following message box will appear:
Your form will then display the search results as follows:
Pay close attention to how the RecordSource is set on the form called frmCustomers. The RecordSource on this form is updated using VBA code and not in the Properties window.
We've also included a "Show all customers" button in case you wish to view all customer records, and a "Generate Report" button to display a report of the search results.