Open a Form in MS Access from Power Point

  • Thread starter Thread starter Richard Troy
  • Start date Start date
R

Richard Troy

Help!

I have used the following VBA code to open MyDatabase.mdb from a button on
my PP Presentation which has the advantage of not exiting the presentation
to use database illustrations.

Private Sub ViewDatabase_Click()
Dim stAppName As String
stAppName = "C:\Program Files\Microsoft Office\Office\MSACCESS.exe
C:\MyDatabase.mdb"
Call Shell(stAppName, 1)
End Sub

However, I would prefer to directly open a form (MyForm) within the database
from the said button.
Can anybody suggest the code I need to add ?

Would appreciate help.

Dick Troy
 
Help!

I have used the following VBA code to open MyDatabase.mdb from a button on
my PP Presentation which has the advantage of not exiting the presentation
to use database illustrations.

Private Sub ViewDatabase_Click()
Dim stAppName As String
stAppName = "C:\Program Files\Microsoft Office\Office\MSACCESS.exe
C:\MyDatabase.mdb"
Call Shell(stAppName, 1)
End Sub

However, I would prefer to directly open a form (MyForm) within the database
from the said button.

Shell-ing the app is roughly equivalent to doubleclicking the app's icon.
Unless you can modify the MDB to open the form you want directly on open, you'd
need to write code that'll automate Access. One of the Access groups would
probably be a better place to ask how to do that (the code's going to be pretty
much the same whether you automate from PPT or some other app).

This might help you get some idea of what's involved, though:

Controlling Office Applications from PowerPoint (by Access MVP Naresh Nichani)
http://www.pptfaq.com/FAQ00795.htm
 
Back
Top