RE: Access
Hi Nikki
This is covered on the Access Advanced course. An example of a maco might be to run one query after another eg an append query followed by a delete query that have been already created. Suppose the queries are called AppendCompleted and DeleteCompleted then
1. Click Create Macro, Macro
2. Enter Action and Arguments
Action Argument
Setwarning No
OpenQuery AppendCompleted
OpenQuery DeleteCompleted
Msgbox All completed records moved
Close and save the macro as MoveCompleted
When you run the MoveCompleted macro the two queries are run one after the other without warning prompts apart from one message at the end.
Hope that helps for now.
Cheers
Doug
RE: Access
Thanks Doug. How can I create a button and attach the macro to the button? i.e the button could be on a form. Also, how do I get access to open on the form page by default?
RE: Access
Hi again Nikki
To get a form to open when you open the database
- Open your database
- click the Office button top left
- Click on Access Options
- Select Current Database
- In Display Form choose which form to open auromatically
To add a macro button to a form
- Open your form in Design view
- Click the Button (form control) button
- Choose the Miscellaneous category, Run macro
- Select which macro to run
- Choose to add text or a picture to the button
Cheers
Doug