How to open ADP Project from MDB Form?

G

Guest

We have a database that for one project we have open a Access Project (ADP)
and run a process from there because we never could make it work in Access.
Anyway, now that we have that working, we would like to be able to launch the
project from a button on a form in the database (MDB) if possible.

I've tried using the code:
Private Sub cmdSelectRandoms_Click()
On Error GoTo Err_cmdSelectRandoms_Click

Dim stAppName As String

stAppName = "msAccess.exe C:\Documents and
Settings\Susan.ASMARK\Desktop\FEA.adp"
Call Shell(stAppName, 1)

Exit_cmdSelectRandoms_Click:
Exit Sub

Err_cmdSelectRandoms_Click:
MsgBox Err.Description
Resume Exit_cmdSelectRandoms_Click

End Sub

Also tried a macro to "RunApp" using:
msaccess.exe C:\Documents and Settings\Susan.ASMARK\Desktop\FEA.adp

Nothing so far has worked. Anybody know how to accomplish this??
Thanks!
Susan
 
A

Albert D. Kallal

You can do the whole thing with one line of code

Try

Application.FollowHyperlink
"C:\Documents and Settings\Susan.ASMARK\Desktop\FEA.adp"

(the above goes on one line..but this newsgroup tends to wrap text)
 

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