access
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

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

Access

resolvedResolved · Low Priority · Version 2007

replyReply Mon 26 Sep 2011, 17:03Delegate Nikki said...

Nikki has attended:
Access Intermediate course

Access

How do I create a macro in Access 2007

For upcoming training course dates see: Pricing & availability

replyReply Mon 26 Sep 2011, 17:44Trainer Doug said...

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

replyReply Tue 27 Sep 2011, 08:28Delegate Nikki said...

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?

replyReply Tue 27 Sep 2011, 17:17Trainer Doug said...

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.

 

Please browse our web site to find out more about
advanced access training and other Microsoft training courses.

Access tip:

Add date to a field

Press CTRL+SEMICOLON

View all Access hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard