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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

already open Access as active application - ???

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I've designed an application in VB 6.0 using Access 97 as report source. It starts Access as follows:

Dim MyAccess As New Access.Application
Set MyAccess = GetObject(DBreport)
MyAccess.DoCmd.OpenReport ReportName, acpreview
MyAccess.Application.Visible = True
MyAccess.DoCmd.Maximize

And that works fine and Access gets the active application. But if DBreport is already open at runtime, I get an errormessage saying I tried a corrupt link to the objectproperty visible (the report is opened in Access, but Access gets not the foreground Aplication).
Is it possible to use the already active Access application or do I have to prevent the case of having my DB already open?
 
you can spot the already active access app -- and switch control to it, you could even control it by sending it keystrokes but it could easily be doing something else that you don't want disturbing.... not sure how you could get around that.....
Mike
michael.j.lacey@ntlworld.com
 
So you think I easily should prevent using that open Access instance?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top