S
scott04
Hello
I am having a small issue with my delete command button. I have several
valadation rules currently in my database. I also have a delete command
button. The form has about 60 fields with lets say 15 required. If a user
enters in 3 fields and then realizes they want to delete the record the
delete button since the other valadation rules are seeing fields have not
been filled out. Is there another command button i can put on the form to go
along with delete? My button works fine on existing records. Any
suggustions? Below is the code on the click:
Private Sub DeleteRecord_Click()
Dim intResponse As String
intResponse = MsgBox("Do you wish to delete this record?", vbYesNo, "Delete
Record")
If intResponse = vbYes Then
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.SetWarnings True
Else
Cancel = True
End If
End Sub
I am having a small issue with my delete command button. I have several
valadation rules currently in my database. I also have a delete command
button. The form has about 60 fields with lets say 15 required. If a user
enters in 3 fields and then realizes they want to delete the record the
delete button since the other valadation rules are seeing fields have not
been filled out. Is there another command button i can put on the form to go
along with delete? My button works fine on existing records. Any
suggustions? Below is the code on the click:
Private Sub DeleteRecord_Click()
Dim intResponse As String
intResponse = MsgBox("Do you wish to delete this record?", vbYesNo, "Delete
Record")
If intResponse = vbYes Then
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.SetWarnings True
Else
Cancel = True
End If
End Sub