Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Slow Learner
 
Posts: n/a
Default Opening Access from Word

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.





 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2003 default view for opening .rtf attachments. rlloyd Microsoft Word Help 1 November 25th 04 02:53 PM
Acrobat writer 5.0 Compatibility with word 2003 Norman Marshall Microsoft Word Help 1 November 25th 04 11:12 AM
Template link prevents word doc from opening Scrich Microsoft Word Help 2 November 24th 04 03:40 PM
Word 97: Error message on opening document Ray Microsoft Word Help 1 November 23rd 04 11:19 PM
Word 2003 tried to access internet when started? Brian Microsoft Word Help 2 November 23rd 04 09:46 PM


All times are GMT +1. The time now is 06:29 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"