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?
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?