1. | Click to select the parent table in the list of tables in the Navigation Pane. For this example, I will select the Orders table.
|
2. | Select
Datasheet from the More Forms drop-down in the Forms group on the
Create tab of the Ribbon. Access creates a datasheet form based on the
Orders table (as shown in Figure 1).
|
3. | Save the form as frmOrdersDatasheet.
|
4. | Select the Order ID column on the form. This may require using the Object drop-down in the Property Sheet.
|
5. | Click the Build button for the On Dbl Click event of the text box. The Choose Builder dialog appears.
|
6. | Select Macro Builder and click OK. The macro appears as in Figure 2.
|
7. | Open the Action drop-down and select If from the list of available actions.
|
8. | Enter the If action to only execute the action that follows it if the Order ID contains a value (see Figure 3).
|
9. | Select the OpenForm action as the action you want to execute if the condition entered is true.
|
10. | Fill
in the arguments of the OpenForm action to open the Order Details form
where the Order ID equals that on the frmOrdersDatasheet form (see Figure 4).
|
11. | Save and close the macro.
|
12. | Double-click the OrderID on the navigation form. The Order Details form should open, displaying data for the selected order.
|