Click to See Complete Forum and Search --> : Simple question


Anis
June 14th, 2001, 08:06 AM
hi to all!

i try to use the Find method of a recordset like this:

recordset.Find " id = " & id_var " , , adSearchForward, 0




it seems simple, but the recordset never begin seeking at the start position (it should be 0)..
so i'm obliged to make a recordset.MoveFirst ..
does anyone knows why ?

thanx
Anis

Spectre5000
June 14th, 2001, 09:20 AM
Yes, you will need to do a recordset.MoveFirst because when you retrieve a recordset, you are at the end of the recordset. You need to go to the first record to perform any type of find or search from the first record. Telling the recordset to find with adSearchForward will tell it to search from the current record.

udipr
June 14th, 2001, 09:20 AM
You can use this:

recordset.FindFirst ("id = " & id_var)

njagan
June 14th, 2001, 11:45 AM
Hi,

That's because you are at the end of your recordset. So, you need to explicitly use MoveFirt to move to the first record.

Regards,
Jagan.