Create a Macro to Display a Message |
|
|
When you find yourself repeating the same tasks, such as searching for products that you need to reorder, create a macro to display a message that an item is out of stock if there are no units in stock and no units on order.
Properties button
Save button
In the database window, on the Forms tab, select Products. Click Design to open the Products form in form design view. Click the Units In Stock text box, and then click the Properties button. On the Event tab, click After Update. To open the macro window and create the macro, use the procedures shown in the following illustration. When youre done, click the Save button. Microsoft Access runs the macro whenever you change the number of units in stock to zero when the number of units on order is also zero.
How are events named?   Events are named after the user actions that cause them. For example, when you change the units in stock to zero in the Products form, the macro that displays the out of stock message runs in response to an AfterUpdate event.
Create macros that respond to other events   You can create other macros that tell Microsoft Access what to do when a user opens a form (an Open event), moves from one record to another (a Current event), or clicks a specific button (a Click event).
Office Assistant button
|
|
Want to know more?   Look up Getting Results - Automate Microsoft Access in Help. |