R
reservedbcreater
i want the user to select which form he wants to go to from a combo box
(the items in the combo box are the form names) and then the user clicks
Go Button(command2_click) and it goes to form they selected in the combo
box and closes current form........my code works but wont close the
current form with the combo box on it. If i put DoCMd.CLose in it it
gives me error that object doesnt exist when i click go.
If Not IsNull(cboreserve) Then
DoCMd.CLose <-------
DoCmd.OpenForm cboreserve
this is my code:
Private Sub Command2_Click()
On Error GoTo Err_Command2_Click
If Not IsNull(cboreserve) Then
DoCmd.OpenForm cboreserve
End If
Exit_Command2_Click:
Exit Sub
Err_Command2_Click:
MsgBox Err.Description
Resume Exit_Command2_Click
End Sub
(the items in the combo box are the form names) and then the user clicks
Go Button(command2_click) and it goes to form they selected in the combo
box and closes current form........my code works but wont close the
current form with the combo box on it. If i put DoCMd.CLose in it it
gives me error that object doesnt exist when i click go.
If Not IsNull(cboreserve) Then
DoCMd.CLose <-------
DoCmd.OpenForm cboreserve
this is my code:
Private Sub Command2_Click()
On Error GoTo Err_Command2_Click
If Not IsNull(cboreserve) Then
DoCmd.OpenForm cboreserve
End If
Exit_Command2_Click:
Exit Sub
Err_Command2_Click:
MsgBox Err.Description
Resume Exit_Command2_Click
End Sub