I have written function:
Public Function IsOpen(ByVal strFormName As String) As Boolean
' Returns True if the specified form is open in Form view.
Const conDesignView = 0
Const conObjStateClosed = 0
IsOpen = False
If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> conObjStateClosed Then
If Forms(strFormName).CurrentView <> conDesignView Then
IsOpen = True
End If
End If
End Function
And I've used the function in a form event:
Private Sub Form_Open(Cancel As Integer)
' Open the View/Edit Trainings form
If Not IsOpen(frmViewEditTrainings) Then
DoCmd.OpenForm "frmViewEditTrainings"
End If
End Sub
After I split the database, the form gives me a compile error (can't find the project or library). When I check the references, Microsoft Office 11.0 Object Library is missing.
Access 2000 only has the 9.0 Object Library. I used Access 2000 to create the database, but I have 2002 on my computer. The weird thing is, it worked fine before I split the database.
My question is can Access 2000 use the 11.0 library and if so, where would I find it. And, if not, is there code to do this same thing using the 9.0 Object Library.
Thanks.
Denise
Public Function IsOpen(ByVal strFormName As String) As Boolean
' Returns True if the specified form is open in Form view.
Const conDesignView = 0
Const conObjStateClosed = 0
IsOpen = False
If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> conObjStateClosed Then
If Forms(strFormName).CurrentView <> conDesignView Then
IsOpen = True
End If
End If
End Function
And I've used the function in a form event:
Private Sub Form_Open(Cancel As Integer)
' Open the View/Edit Trainings form
If Not IsOpen(frmViewEditTrainings) Then
DoCmd.OpenForm "frmViewEditTrainings"
End If
End Sub
After I split the database, the form gives me a compile error (can't find the project or library). When I check the references, Microsoft Office 11.0 Object Library is missing.
Access 2000 only has the 9.0 Object Library. I used Access 2000 to create the database, but I have 2002 on my computer. The weird thing is, it worked fine before I split the database.
My question is can Access 2000 use the 11.0 library and if so, where would I find it. And, if not, is there code to do this same thing using the 9.0 Object Library.
Thanks.
Denise