Hi David,
> I don't know how to create an Autoexec macro so I'll try using the Startup
> option within Access.
There's really nothing special about creating an Autoexec macro
(technically, a macro group), versus any other macro. First, lets clarify the
difference between a macro group and a macro name. A macro group is what you
see in the database window when you click on the macros tab (Access 2003 and
earlier). A macro group can contain one or more named macros within it.
Select the macros group. Click on the New button. A new macro group opens up
in design view. Click on the Save button. Assign the name "Autoexec" (without
the quotes). You've just created your first Autoexec macro (or, more
technically correct, your first Autoexec macro group). However, so far, there
are no assigned actions, so nothing will happen if you run this macro.
Select MsgBox in the Action column. Press the F6 key to toggle to the lower
window. Enter "Hello David!" (again, without the quotes) in the message. Save
the macro. To see it work, close your database and re-open it. You should see
a greeting message. That little test demonstrates how this specially named
macro group can be used to run an Action at database startup. Instead of
MsgBox, you can specify OpenForm as the Action, with the name of the form in
the lower window. You can specify RunCode, with the valid name of a function
in a Public module, if you want to run a function.
I hinted earlier at macro name vs. macro group. When you have a macro open
in design view, you can choose to display an additional column "Macro Name".
The menu option View > Macro Names is used to toggle the display of this
column on and off. You can enter a macro name here. When you run a macro
group, only the first macro name will execute. Processing will stop as soon
as a different macro name is encountered. However, you can certainly specify
a certain macro name to run within a particular macro group. This allows one
to have closely related macros all packaged up within one macro group.
Open the sample Northwind database (Access 2003 and earlier). The macro
group named "Customer Phone List" includes two macros, named "Alpha Buttons"
and "Print". The first three lines include comments only. Similarly, the
Suppliers macro group contains five named macros: Add Products, Review
Products, Show Related Products, Close and Validate Postal Code.
I hope this helps some.
Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/ex...tributors.html
__________________________________________
"David Portwood" wrote:
> I don't know how to create an Autoexec macro so I'll try using the Startup
> option within Access. I hope A2000 has that option. As soon as I deploy my
> app (and after another week or so of bows and gracious acceptances of
> praise: "Kind of you to say so, Mr. President, but really any genius could
> have done it") I'll start nudging my boss in the direction of an upgrade.
>
> Btw, your article concerning performance improvements for a split, multiuser
> app was very helpful. Thank you very much.