Dumb question no. 243: I have a form displayed which includes a command button to delete the current record. How do I delete the current record? Below is the code I have managed to get so far...
.
.
.
'Deletes the current specimen record (confirmation box)
Private Sub cmd_DeleteThisSpecimen_Click()
On Error GoTo Err_cmd_DeleteThisSpecimen_Click
Dim strPromptText As String, strTitleText As String
strPromptText = "Confirm delete this record?"
strTitleText = "Delete Record"
If MsgBox(strPromptText, vbOKCancel + vbExclamation, strTitleText) = vbOK Then
'delete the current record, somehow!
End If
Exit_cmd_DeleteThisSpecimen_Click:
Exit Sub
Err_cmd_DeleteThisSpecimen_Click:
MsgBox Err.Description
Resume Exit_cmd_DeleteThisSpecimen_Click
End Sub
.
.
.
The bit I'm stuck on is 'delete the current record, somehow!
Any ideas anybody?
Mike
ps Keep any reply simple - because I am!
.
.
.
'Deletes the current specimen record (confirmation box)
Private Sub cmd_DeleteThisSpecimen_Click()
On Error GoTo Err_cmd_DeleteThisSpecimen_Click
Dim strPromptText As String, strTitleText As String
strPromptText = "Confirm delete this record?"
strTitleText = "Delete Record"
If MsgBox(strPromptText, vbOKCancel + vbExclamation, strTitleText) = vbOK Then
'delete the current record, somehow!
End If
Exit_cmd_DeleteThisSpecimen_Click:
Exit Sub
Err_cmd_DeleteThisSpecimen_Click:
MsgBox Err.Description
Resume Exit_cmd_DeleteThisSpecimen_Click
End Sub
.
.
.
The bit I'm stuck on is 'delete the current record, somehow!
Any ideas anybody?
Mike
ps Keep any reply simple - because I am!