[RESOLVED] delete the current record

hi all
I am a newbie in VB..I have connected MS access and VB and created a form..suppose if I have 4 records..and I keep moving to the next record using the movenext pointer and have arrived at the 3rd record ..Now if i want to delete it what should be in my delete button code..the problem is if I reach the 3rd record and press delete button the 1st record gets deleted..I have included rs.delete alone in my code..
[424 byte] By [decoder] at [2007-11-20 11:30:33]
# 1 Re: [RESOLVED] delete the current record
maybe you are execute a MoveFirst before this one is delete.

it's probably you do :

rst.movefirst
rst.delete


use delete only .

rst.delete
hensa22 at 2007-11-9 19:33:03 >
# 2 Re: [RESOLVED] delete the current record
Private Sub Command3_Click()
rs.Delete
End Sub

This is my code
decoder at 2007-11-9 19:34:14 >
# 3 Re: [RESOLVED] delete the current record
That deletes the current rs. You didn't show the rest of the code that fires before that.

It would be easier if you didn't use bound controls. Then, you could just fire a sql delete statement to delete a record from a table.

DELETE * FROM MyTable WHERE ID=""
dglienna at 2007-11-9 19:35:13 >
# 4 Re: [RESOLVED] delete the current record
ok ppl ..thanks for replying..I used the following and the current record got deleted
.
Data1.Recordset.Delete
decoder at 2007-11-9 19:36:13 >