Hello -
I would like to have access when someone opens it to automatically run a macro or program module. I read is AutoExec macro,
However I put the function name to runcode it doesn’t work.
Please advise.
Thank you
Hello -
I would like to have access when someone opens it to automatically run a macro or program module. I read is AutoExec macro,
However I put the function name to runcode it doesn’t work.
Please advise.
Thank you
The alternative to an autoexec is to have access open a form on start up and run your code from that.
The form can be hidden to prevent users from interfering with it.
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓
Can you show me with examples the two ways. I use the autoExec, it doesn’t work on me and is having an issue.
Have look here https://btabdevelopment.com/how-to-set-a-startup-form/ this is for earlier versions.
The same options are available in the current database tab under File¬Options menu. "Display Form" will display a form on start up.
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓
I think I like the AutoExec method more because it’s a macro that when Access is open is runs the code.
Doesn’t need any form to run it.
So what have you tried in an Autoexec that doesn't work ? Can you post a screen shot?
The Form can have many advantages, you can use it to store hidden data about the current user, when they opened the app and give them command buttons to access the rest of the system..
Here's the link for newer access https://btabdevelopment.com/how-to-s...m-access-2010/
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓
Here's a barebones working example.
Thanks I just tried it a couple of times and figured it out. In the Macros I just change the name to AutoExec and in the designed view I selected RunCode and function name as functionname(). And in the module I have it as public function functionname()