nancybrown
Well-known Member
- Joined
- Apr 7, 2005
- Messages
- 868
Can someone advise please how to modify this code so when the command button on the main form is clicked to open another form, the main form closes.
Private Sub cmdAPMenu_Click()
On Error GoTo Err_cmdAPMenu_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmAPMenu"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdAPMenu_Click:
Exit Sub
Err_cmdAPMenu_Click:
MsgBox Err.Description
Resume Exit_cmdAPMenu_Click
End Sub
Private Sub cmdAPMenu_Click()
On Error GoTo Err_cmdAPMenu_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmAPMenu"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdAPMenu_Click:
Exit Sub
Err_cmdAPMenu_Click:
MsgBox Err.Description
Resume Exit_cmdAPMenu_Click
End Sub