I am a beginner and so this might be easy. Here is my situation:
I have a DelEmpFrm. On this form I have an ADO connection to an Access dbase, 2 command buttons (Delete, and Cancel), and a Datacombo box.
I want to be able to select a name from the combobox and hit the delete command to delete that record from the database.
How it stands now, I select a name and hit delete. It deletes the first record not the one I have selected.
This is the code I have the delete button.
Private Sub Command1_Click()
If MsgBox("Are you sure you wish to delete this name?", vbQuestion + vbYesNo, "Delete Record") = vbYes Then
any help would be appreciated. Thanks!