AutoExec Macro Doesn't run

SirDrums

Registered User.
Local time
Today, 10:50
Joined
Jul 15, 2009
Messages
83
I have created an autoexec macro that runs just fine when I open access directly.

However, when the .mdb is accessed by another application (.ldb placed on file and the access program itself isnt run) the macro does not run.

Is there a trick to this? How do I get the macro to run even if the MDB is open by another application?
 
Not sure exactly what you mean by opening the mdb without running access. Are you trying to run multiple users at once? That's usually when you'll run into ldb issue. Read up on splitting the dbase front end and back end. Each user has their own mde file with linked tables for a common backend. Everyone Opens their own file no ldb issues.
 
A connection to a database from another application does not constitute it being "opened" in the sense of the Access Application which is what runs the macro.
 
A connection to a database from another application does not constitute it being "opened" in the sense of the Access Application which is what runs the macro.

Is there a way to get the autoexec to run in this scenario?

We have an app that opens a MDB programatically and I want to run a macro when it 'opens' the mdb.

I have no control of the app itself so I am trying to find a way to run this macro.
 
What does the macro actually do? Perhaps you could write a substitute that could be triggered some other way.
 
The macro just runs a create table query. Very simple and runs fine when it actually runs.

I do not know of another way to get this macro to run when a another program opens a connection to the mdb.

The reason it need to run is so it can refresh the table (delete, recreate).
 
If you cannot modify the app then ust add the macro functionality to a shell for calling the app

e.g. using scripting engine
'open database
'delete table
'create table
'run app
There are lots of web sites that will show you how to do the above using wscript.
 
Which program are you connecting to the mdb file? As mentioned, just connecting doesn't run anything other than it opening the ldb file since it will still need to manage the locks on records.

But, you can, if you have the ability to write VB/VBA for the other program to execute, can do almost anything you want with that database using the Common Object Model programming. So, the question is, can you modify the program that is connecting in any way?
 

Users who are viewing this thread

Back
Top Bottom