
Edward A. answered 04/27/23
Finance Professional with Over 30 Years of Global Corporate Experience
To build a macro in MS Access that finds a record in one of your tables and then opens that record in the form view of one of the forms you have created, you can follow these steps:
1. Open the Macro Builder in MS Access by selecting "Macros" from the navigation pane and clicking "New" or by selecting "Create" from the ribbon and choosing "Macro" from the drop-down menu.
2. In the Macro Builder, select "OpenForm" from the list of actions in the Action Catalog.
3. In the "OpenForm" action, select the form you want to open from the "Form Name" drop-down list.
4. In the "Where Condition" field of the "OpenForm" action, enter the criteria that will find the record you want to open in the form. For example, if you want to find a record with a specific ID, you might enter "[ID]=[Forms]![SearchForm]![txtID]" if the ID value is entered in a text box called "txtID" on a form called "SearchForm."
5. Save and close the Macro Builder.
6. To run the macro, you can either create a button on a form that runs the macro when clicked or select the macro from the navigation pane and click "Run" in the ribbon.
When you run the macro, it will open the specified form and display the record that matches the criteria you entered in the "Where Condition" field of the "OpenForm" action.