Hi All,
I'm looking to check if a MSAccess 2003 form is open from RSView32 (industrial Scada) VBA. If it is open I want to close or bring it forward so the operator does not open another instance. I can kill the app and this seem to work but there must be a better way. Just as a note I'm a PLC programmer and my VB skills are poor so please be gentle. Thanx
Here is how we are currently calling the form.
'Open Access Database to allow the operators to view the access database screens Reporting ONLY!
'******************************************************************************************
Public Sub Open_Reporting()
On Error Resume Next
'MsgBox "Test1"
Set AppAccess = GetObject(, "Access.Application")
On Error GoTo Open_Reporting_Err
Set AppAccess = GetObject("C:Access\System_Forms_Only.mdb", "Access.Application")
AppAccess.Application.Visible = True
'AppAccess.window(1).Visible = True
Exit Sub
Open_Reporting_Err:
MsgBox "Error in Open_Reporting" & Chr$(13) & Err.Description & " ," & Err.Number
Exit Sub
End Sub
I'm looking to check if a MSAccess 2003 form is open from RSView32 (industrial Scada) VBA. If it is open I want to close or bring it forward so the operator does not open another instance. I can kill the app and this seem to work but there must be a better way. Just as a note I'm a PLC programmer and my VB skills are poor so please be gentle. Thanx
Here is how we are currently calling the form.
'Open Access Database to allow the operators to view the access database screens Reporting ONLY!
'******************************************************************************************
Public Sub Open_Reporting()
On Error Resume Next
'MsgBox "Test1"
Set AppAccess = GetObject(, "Access.Application")
On Error GoTo Open_Reporting_Err
Set AppAccess = GetObject("C:Access\System_Forms_Only.mdb", "Access.Application")
AppAccess.Application.Visible = True
'AppAccess.window(1).Visible = True
Exit Sub
Open_Reporting_Err:
MsgBox "Error in Open_Reporting" & Chr$(13) & Err.Description & " ," & Err.Number
Exit Sub
End Sub