S
Steve Norris via AccessMonster.com
My cancel button is not working. It's opening my add form even if I click
on the cancel button. Below is my code. Thanks in advance for any
suggestions......
Private Sub AddNewRcd_Click()
On Error GoTo Err_AddNewRcd_Click
If MsgBox("Are you sure you want to ADD A New Record? ", vbOKCancel) <>
vbOK Then
Cancel = True
End If
DoCmd.OpenForm "frmProfileAdd2"
DoCmd.GoToRecord , , acNewRec
Exit_AddNewRcd_Click:
Exit Sub
Err_AddNewRcd_Click:
MsgBox "ADD Canceled" 'Err.DescriptionErr.Description
Resume Exit_AddNewRcd_Click
End Sub
on the cancel button. Below is my code. Thanks in advance for any
suggestions......
Private Sub AddNewRcd_Click()
On Error GoTo Err_AddNewRcd_Click
If MsgBox("Are you sure you want to ADD A New Record? ", vbOKCancel) <>
vbOK Then
Cancel = True
End If
DoCmd.OpenForm "frmProfileAdd2"
DoCmd.GoToRecord , , acNewRec
Exit_AddNewRcd_Click:
Exit Sub
Err_AddNewRcd_Click:
MsgBox "ADD Canceled" 'Err.DescriptionErr.Description
Resume Exit_AddNewRcd_Click
End Sub