How do i set up variables when access starts??

martinr

Registered User.
Local time
Today, 09:28
Joined
Nov 16, 2011
Messages
74
I need to set some 'global' variables with default values when my Access 2007 database is loaded. Depending on the user etc these values may be modifed after Access starts but defaults need to be set.

I declared the variables as 'Public' in a Module, then put a function in the same Module (to set the default values) then tried to call the function from an "AutoExec" macro, so it's the first thing that runs when Access loads.

The macro throws an error - it can't 'find' the function(?)

Is the best way to to do this?
Iif so, what do i need to change and if not - what is a better method?
 
Probably you haven't declared your function as public
 
Thanks that fixed it.
 

Users who are viewing this thread

Back
Top Bottom