Hi,
I have had a good look round the posts, but can't find the answer to this.
I have a form I want to run from another database, which I call using the following code. This database is added as a reference.
Public Function Timing()
Call opentimingmain
End Function
I have this code stored in a module.
This works fine when I run it from inside the module.
What I want to do is run this code when I open access, without opening any other forms, / switchboards etc.
I have tried creating a macro called autoexec and using the runcode command with the function name timing() which I selected from the list it showed me, so spelling is correct.
When I try and run this macro the message
"The expression you entered has a function name that Microsoft Access can't find"
This is very confusing, as it showed me the name in the macro design screen.
can anyone suggest the reason. Although I have been programming in access for 4 or 5 years, I have never used macros, so don't quite know what I am doing here.
Is there another way of running code from a module on startup?
Thanks in anticipation.
Sue
I have had a good look round the posts, but can't find the answer to this.
I have a form I want to run from another database, which I call using the following code. This database is added as a reference.
Public Function Timing()
Call opentimingmain
End Function
I have this code stored in a module.
This works fine when I run it from inside the module.
What I want to do is run this code when I open access, without opening any other forms, / switchboards etc.
I have tried creating a macro called autoexec and using the runcode command with the function name timing() which I selected from the list it showed me, so spelling is correct.
When I try and run this macro the message
"The expression you entered has a function name that Microsoft Access can't find"
This is very confusing, as it showed me the name in the macro design screen.
can anyone suggest the reason. Although I have been programming in access for 4 or 5 years, I have never used macros, so don't quite know what I am doing here.
Is there another way of running code from a module on startup?
Thanks in anticipation.
Sue