Arguments for an Access 2007 macro

Macro arguments in Access XP It's only a small improvement but I was very pleased when I realised what had been added to the macro designer in Access 2007. In previous versions - like the Access XP screenshot opposite - you've only been able to see the details of one row in the macro at a time.

In the example the designer is on the first action in the macro and can see from the bottom pane that this OpenForm action opens the ClubEntry form in a normal window in Edit mode. The only way to find out what the second OpenForm does is to scroll down three rows and look at the Action Arguments for that line. By doing that of course you lose sight of the details of the first line and so comparing the details of two actions in a macro becomes a long job. The Comments column can be a help but my usual problem is that I want to compare the syntax of the two lines to discover why one is working but the other is failing.

Macro arguments in Access 2007 The Macro Designer in Access 2007 helps with this problem because an optional new column has been added to design grid in the top half of the designer. The Arguments column in the screen shot on the left shows the arguments for each macro action as a comma- separated list.

This means that I can see the arguments being passed to both OpenForm actions at once, I can see that the first is opening the Club form and the second is opening the Members form and I can see that (apart from the name of the form itself) the two actions seem to have the same arguments so they both ought to be working. As a bonus, I can also see what the two RunCode actions are doing. The StopMacro action takes no arguments so the column is empty for that row.

Show Access 2007 macro arguments You can't see the exact meaning of these arguments in the comma-separated list but you can always look down at the Action Arguments area if you need that much detail. You have to use the Action Arguments area when you are adding or editting the action. The Arguments column in the grid is read-only.

The Arguments column is only a small change but I find that being able to see the details of all the actions at once really does help me to understand what a macro is doing. If the Arguments column isn't visible in the grid, click the Arguments button in the Design section of the ribbon.

MS Access technical tips

Visual FoxPro technical tips

General Tips

 

More tips from Alvechurch Data

Access 2007 file extensions

Access 2007 has new file extensions.

Read More

Multiple values in Access 2007

Access 2007 allows us to store multiple values in a lookup table.

Read More