
Signature
Jeff C
Live Well .. Be Happy In All You Do
If you intend for this to open the other Access application, open a form,
and run events, you'll be disappointed. OpenDatabase ONLY opens the
database, not the Access database application. There is a difference. In
order to do what you want, you could use the Shell command to open the
Access database file with the /x switch. This will execute a macro which
could contain all your commands or just run a function that executes all
your command. Then at the bottom of you code, (in the remote database) you
close the application.
Something like this:
Set db = CurrentDb
Filename = "\RemoteMacro.mdb"
ExecutionMacro = " /xAutoRun"
'the directory where the application lives
Directory = getpath(db.Name)
'finds where Access itself lives
AppPath = SysCmd(acSysCmdAccessDir) & "MSACCESS.EXE"
'MsgBox AppPath & " " & Directory & Filename
htask = Shell(AppPath & " " & Directory & Filename & ExecutionMacro, 1)
This code will open the external database, excuting the AutoRun macro. This
macro calls some code then quits.
On my website (www.rogersaccesslibrary.com), is a small Access database
sample called "RunRemoteMacro.mdb" which illustrates how to do this.

Signature
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
> This database is set up so that when I open it up, a form loads that has
> about 12 sequenced events that run one after the other to update the data
[quoted text clipped - 19 lines]
>
> Thank you
Jeff C - 21 May 2007 17:13 GMT
Thank you Roger, I'll look at your example and try to get this working, I'll
post back with questions. I appreciate your help.

Signature
Jeff C
Live Well .. Be Happy In All You Do
> If you intend for this to open the other Access application, open a form,
> and run events, you'll be disappointed. OpenDatabase ONLY opens the
[quoted text clipped - 46 lines]
> >
> > Thank you
you don't need to pause it
but you do need to change it to ADO
I mean get with the times kids
> This database is set up so that when I open it up, a form loads that has
> about 12 sequenced events that run one after the other to update the data
[quoted text clipped - 22 lines]
> Jeff C
> Live Well .. Be Happy In All You Do