For example, you can put an Open Orders command button on a Customers form that opens an Orders form and automatically fills in billing information from the Customers form.
Clicking the Open Orders button opens the Orders form with the billing information from the Customers form.
Updating the value of a control that's dependent on the value of another control
For example, you might have a PaymentDate control whose default value is the ship date (the value of the ShipDate control). You can use a macro or an event procedure to automatically reset the value of the PaymentDate control whenever the value in the ShipDate control changes.
Setting a form or control property in response to a selection or other event
You can use a macro or an event procedure to set a form or control property in order to:
- Hide or display a control based on the value of another control. For example, you might want the DateDue control on an Orders form to be hidden if the order is already paid for (if the Paid control's value is Yes) or visible if payment is still due.
- Disable or lock a control based on the value of another control. For example, you can disable a DriversLicense control if the value of an Age control is below the minimum age for a driver's license.
- Display different sets of records depending on a selection. For example, you can control which records are displayed in a Customers form, depending on which option is selected in a Customer Type option group.