Trouble deleting the 1st record in a recordset

Status
Not open for further replies.

DKasler

Baseband Member
Messages
36
Hey, im trying to delete the 1st record of a record set, and for some reason its not working... It works for the last record and any middle records, just not the 1st

Code:
Private Sub Command4_Click()
Dim strMsg1
strMsg1 = "Are you sure you want to Delete the record with Vid '" & Text8.Text & "' record?"
If MsgBox(strMsg1, vbQuestion + vbYesNo + vbDefaultButton2, "Exit?") = vbYes Then

Data3.Recordset.FindNext "vid LIKE '*" & Text8.Text & "*'"
Data3.Recordset.Delete
Data3.Recordset.MoveNext
End Sub


Any thoughts?
 
Im retarted... problem all fixed.

I changed the Data3.Recordset.FindNext

in Data3.Recordset.FindNext "vid LIKE '*" & Text8.Text & "*'"

to

Data3.Recordset.FindFirst and it works fine now. Since it was the 1st record FindNext was skipping right over it.
 
Status
Not open for further replies.
Back
Top Bottom