Noora No
Noora No

Reputation: 309

cannot find name when running AutoExec macro

In Access I created a Function within a Module.

I need to execute this module when the Access application first opens.

In the AutoExec macro, I added the action [RunCode] and wrote the name of the function from this module in [Function Name] but when I run the application I am getting the following error: access error msg

Upvotes: 1

Views: 276

Answers (1)

Johnny Bones
Johnny Bones

Reputation: 8404

If you're using a function, you should always include a set of parenthesis at the end:

DsnLessLinkTable()

This is the proper way to reference a function, and becomes important if you are ever passing variables to a function, so it's good practice to always use that syntax.

Upvotes: 1

Related Questions