Hi All,
I create two MainMenus Form (UserMenu and AdminMenu).On both Menu Forms I have buttons what open same forms (search and Add/Edit File). Now if I open Search form than Mainmenu form is invisible, far so good. But on close event of Search form how to define with form was hiden (UserMenu or AdminMenu) ?
On Close Event for Search and Add/Edit File forms I create this code :
Private Sub Form_Close()
On Error GoTo err_FormMessage
If Forms!frmMainMenu.Visible = False Then
Forms!frmMainMenu.Visible = True
End If
If Forms!frmUserMenu.Visible = False Then
Forms!frmUserMenu.Visible = True
End If
Exit_formMessage:
Exit Sub
err_FormMessage:
If Err.Number = 2450 Then
Resume Next
Else
MsgBox Err.Number & Err.Description
End If
Resume exit_formMessage
End Sub
---------------------------------
But I don't think this is right approach
any ideas?
Thanks
Fule
I create two MainMenus Form (UserMenu and AdminMenu).On both Menu Forms I have buttons what open same forms (search and Add/Edit File). Now if I open Search form than Mainmenu form is invisible, far so good. But on close event of Search form how to define with form was hiden (UserMenu or AdminMenu) ?
On Close Event for Search and Add/Edit File forms I create this code :
Private Sub Form_Close()
On Error GoTo err_FormMessage
If Forms!frmMainMenu.Visible = False Then
Forms!frmMainMenu.Visible = True
End If
If Forms!frmUserMenu.Visible = False Then
Forms!frmUserMenu.Visible = True
End If
Exit_formMessage:
Exit Sub
err_FormMessage:
If Err.Number = 2450 Then
Resume Next
Else
MsgBox Err.Number & Err.Description
End If
Resume exit_formMessage
End Sub
---------------------------------
But I don't think this is right approach
any ideas?
Thanks
Fule