I am currently creating my project for visual basic, which is particularly a database. However, error code 3021 shows up when I click delete even though I do not have a database. How could I solve it?
Here is my code for the delete button ( when clicked if data is none, it displays an error).
Here is my code for the delete button ( when clicked if data is none, it displays an error).
Code:
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