Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Trouble deleting the 1st record in a recordset
Closed Thread
Old 10-14-2004, 10:50 AM   #1 (permalink)
 
Newb Techie

Join Date: Mar 2004

Posts: 36

DKasler

Send a message via AIM to DKasler Send a message via Yahoo to DKasler
Default Trouble deleting the 1st record in a recordset

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?
DKasler is offline  
Old 10-14-2004, 12:29 PM   #2 (permalink)
 
Newb Techie

Join Date: Mar 2004

Posts: 36

DKasler

Send a message via AIM to DKasler Send a message via Yahoo to DKasler
Default

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.
DKasler is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On