Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Runcode from a macro.

Status
Not open for further replies.

MikiH

Programmer
Sep 25, 2002
78
GB
Hi


I've been asked to have a look at an old database developed by somebody a lot smarter than me. Anyway the problem I have is,

The autoexec macro falls over when the Runcode calls a Function called "start_db()". Access cannot find it. It's hid away in a module called "mdl_start" with lots of other code.

How can I show access the path in the macro?

Thanks
 
Check to see if the that function/sub in the module is public or private. If it says public before the word "sub" or "funtion" (I don't know which it is, since I can't see it), then that is not the problem. But, if it just says "Sub" and the name or "Function" and the name, or it says Private Sub or Private Function, then that would be why the macro is not seeing it. At that point, you just need to change the "Private" to "Public" or if there is nothing before it, then add the Public in fron of the sub or function like this:

Public sub start_db()
or
Public Function start_db()

Hope that helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top