Here is my code for the delete button ( when clicked if data is none, it displays an error).
Expand|Select|Wrap|Line Numbers
- Private Sub cmdDelete_Click()
- Confirm = MsgBox("Wait, are you sure about this?", vbOKCancel + vbExclamation, "Deleting...")
- If Confirm = vbOK Then
- library.Recordset.Delete
- MsgBox "Goodbye Record!", , "Record Deleted!"
- ElseIf Confirm = vbCancel Then
- MsgBox "Phew! That was close!", , "Phew..."
- End If
- cmdNext.Enabled = False
- cmdPrevious.Enabled = False
- txtTitle.Text = " "
- txtDirectors.Text = " "
- txtYear.Text = " "
- cboRating.Text = " "
- txtCharacters.Text = " "
- txtDescription.Text = " "
- End Sub