View Single Post
  #4   Report Post  
Slow Learner
 
Posts: n/a
Default

Thanks and yes I thought maybe you could shed some light on how to do this in
the Word program.

"Graham Mayor" wrote:

As my name appears in the subject, I guess you intend an answer from me;
however I know nothing about Access so cannot assist.
Try an Access and/or vba newsgroup.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Slow Learner wrote:
Do you know how to do this? Can you give me any suggestions

"Slow Learner" wrote:

I have a Word document which I wish to have close and open an Access
Database form.

This is the code I have put cmdAccess1 Click which shows under
Project(Viable) Microsoft Word Objects:

Private Sub cmdAccess1_Click()

On Error GoTo Err_cmdAccess1_Click

Dim oApp As Object

Set oApp = CreateObject("Access.Application")
oApp.Visible = True
oApp.Database.Open "c:\test\access\TEST.mdb"


Exit_cmdAccess1_Click:
Exit Sub

Err_cmdAccess1_Click:
MsgBox Err.Description
Resume Exit_cmdAccess1_Click

End Sub

If all went well and the Access database would open and at a
Switchboard form for the user to navigate through and close the Word
program.
Best would be to have it reopen the form that it came from in the
database as there is a command button in Access which opens this
report. Have no idea how to do this but the code above is my start.