Running a Macro in Another Database

C

Chaplain Doug

In answer to the following problem I have received no help. Everyone says,
"You cannot or should not try to modify the properties of a table in the
backend from the front end!"Access 2003. How may I modify a linked tables properties from the front end
of a database? I do not what to have to open the back end to make the
changes. Ultimately, either I need to know what options to set in the front
end so that linked tables may be modified (the structure that is) or I need
to know the VBA code I can use to modify a linked tables properties. I have
posted this question in another form elsewhere to no avail. Thank anyone who
can help.
I have placed a macro in the backend that fixes my tables. How can I run
this macro from the frontend. The reply, "You should not do this" does not
help. I have to do this. Thank you for ANY help.
 
O

Ofer Cohen

You can use reference from MDB1 to MDB2.
Doing that will enable MDB1 to run all the functions in MDB2.

Open MDB1, open code (any where or press Ctrl+G), select tools, reference.
browse and select MDB2.
You will notice that MDB1 recognise all the functions, but it wont recognise
forms, reports, macros etc, so if for example you want to run a macro in MDB2
From MDB1, create a function in MDB2 that run the macro, and then call that
function from MDB1.
 
W

Wayne-I-M

Hi

The basic are

"C:\Program Files\Microsoft Office\Msaccess.exe" "C:\Pathr\DBname.mde" /x
Macro

Note all on one line.


You can use something like this

I am working on C drive and calling the macro on the server (S drive)
so change these if you need

Call Shell("""C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE""
""S:\MyDocuments\MyDataBase.mdb""/XOpenNewForm", 1)

Note the name of the macro is OpenNewForm - leave the X in place.

Hope this helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top