T
TIm Rush
Below is my procedure for returning focus to an open form. I get the
following error: “Run-time error ‘2467’: The expression you entered refers to
an object that is closed or does not exist. “
The form is open when this happens. ( I’ve added traps after the isloaded
check to return a msgbox response if found and open.).
Using A2002.
This takes a button click from one menu form page, closes it, and returns
control to the main menu page. (These pages replace the switchboard).
Private Sub Return_Click()
DoCmd.Close acForm, Me.Name ‘Close this menu
If IsLoaded("pgMain") Then ‘Check for main menu
Forms![pgMain].SetFocus ‘show main menu if open
Else
DoCmd.OpenForm "pgMain", acNormal ‘main menu was closed
End If
End Sub
following error: “Run-time error ‘2467’: The expression you entered refers to
an object that is closed or does not exist. “
The form is open when this happens. ( I’ve added traps after the isloaded
check to return a msgbox response if found and open.).
Using A2002.
This takes a button click from one menu form page, closes it, and returns
control to the main menu page. (These pages replace the switchboard).
Private Sub Return_Click()
DoCmd.Close acForm, Me.Name ‘Close this menu
If IsLoaded("pgMain") Then ‘Check for main menu
Forms![pgMain].SetFocus ‘show main menu if open
Else
DoCmd.OpenForm "pgMain", acNormal ‘main menu was closed
End If
End Sub