H
Harmannus
Hallo,
I have 2 forms. One is a main form and another "mainbasedform" that show a
selection of fields based on the main form. To prevent save problems i want
to prevent the main form to be opened if the mainbased form is open.
This main form is accessable through a menu bar. So how can i prevent the
main form to be opened by code if the "mainbasedform" is open?
I tried the below but can't get it to work
If Not IsLoaded("frmMainbased") Then
MsgBox "Form can't be opened!", vbInformation
Cancel = False
Else
DoCmd.OpenForm "frmMain"
End If
Thanx for any tips!
Regards,
Harmannus
I have 2 forms. One is a main form and another "mainbasedform" that show a
selection of fields based on the main form. To prevent save problems i want
to prevent the main form to be opened if the mainbased form is open.
This main form is accessable through a menu bar. So how can i prevent the
main form to be opened by code if the "mainbasedform" is open?
I tried the below but can't get it to work
If Not IsLoaded("frmMainbased") Then
MsgBox "Form can't be opened!", vbInformation
Cancel = False
Else
DoCmd.OpenForm "frmMain"
End If
Thanx for any tips!
Regards,
Harmannus