access

Forum home » Delegate support and help forum » Microsoft Access Training and help » Access

Access

resolvedResolved · Low Priority · Version 2007

Nikki has attended:
Access Intermediate course

Access

How do I create a macro in Access 2007

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

Tue 4 Oct 2011: Automatically marked as resolved.


 

Access tip:

Pop up property

If you want to focus the attention of a form / switchboard to a user then you can change the propeties of a form/switchboard for Pop up to On.

This meand tht the focus for the user must be on the form / switchboard

View all Access hints and tips


Server loaded in 0.08 secs.