Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening another DB from a command button 1

Status
Not open for further replies.

GoinDeep

Technical User
Jan 9, 2003
100
0
0
US
What would be the code for opening another db from a command button?
 
Call Shell(strOpen, vbMaximizedFocus)

where strOpen is the full path to your other database.

HTH
Lightning
 
Hey GoingDeep;
I am doing something similar and haveing an irritating problem. I'm using;

Private Sub RunVisitsMerge_Click()
On Error GoTo Err_RunVisitsMerge_Click
Dim WordDocument As Word.Document
Set WordApp = CreateObject("Word.Application")
WordApp.Documents.Open ("S:\working\working Forms\Second Visit\By Date Range\CompleteMergeForFollowup.doc")
WordApp.Visible = True
Set WordApp = Nothing
Set WordDocument = Nothing

to open a Work Merge document. This document runs on a query that grabs start date and stop date from the form this VB is attached to. This is all across a network of course.

The problem is that I'll fill in the start and stop date on the form, and click the button that runs the VB above. Nothing. Wait about 30 seconds and click it again - a warning pops up that I already have the document open and that I can only open it in 'read only' mode. If I agree to that the merge document opens fine.

Any ideas at all?

"Man is the cheapest computer we can put into a spacecraft and the only one we can mass-produce with unskilled labor." Werner von Braun

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top