Hello All,
I have a button on a form, the code for it is below. When I click on the button it opens another form, however, I want the form with the button to close when I do this. What do I add to the code below to allow it to do this?
Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Accounts Payable Switchboard"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
End Sub
Thanks,
Nino
I have a button on a form, the code for it is below. When I click on the button it opens another form, however, I want the form with the button to close when I do this. What do I add to the code below to allow it to do this?
Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Accounts Payable Switchboard"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
End Sub
Thanks,
Nino