ADO Recordset from SQL Server (FindFirst method not working)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I have a form where I set itsrecordset object to a recordset returned via SQL server 2000 using and ADO recordset

That works great...here is my problem

The FindFirst method of the recordsetclone object doesn't seem to work.

Me.RecordsetClone.FindFirst "EventID = " & lngEventI

I get an error 438 - object doesn't suppor this porperty or method

I've used this method many times before when the form was based on a DAO recordset. Is there a white paper on this? Is there an alternative? I can't use the bookmark, because I'm trying to remember record locations after the data has been requeried

Thanks
Mik
 
Mike,

I've run into the same issue. Since I'm not quite sure
what else is going on when you look for that event
record, I don't know if my suggestion will work for you.
How are you getting the variable value for lngEventID?
If it's from a control on the form, you might try the
following. It may not be the best way of doing it, but
it works.

DoCmd.ShowAllRecords
DoCmd.GoToControl "EventID"
DoCmd.FindRecord lngEventID

Diana Criscione
-----Original Message-----
Hi,
I have a form where I set itsrecordset object to a
recordset returned via SQL server 2000 using and ADO
recordset.
That works great...here is my problem.

The FindFirst method of the recordsetclone object doesn't seem to work.

Me.RecordsetClone.FindFirst "EventID = " & lngEventID

I get an error 438 - object doesn't suppor this porperty or method.

I've used this method many times before when the form
was based on a DAO recordset. Is there a white paper on
this? Is there an alternative? I can't use the
bookmark, because I'm trying to remember record locations
after the data has been requeried.
 
Dataman said:
I have a form where I set itsrecordset object to a recordset returned via SQL server 2000 using and ADO recordset.

That works great...here is my problem.

The FindFirst method of the recordsetclone object doesn't seem to work.

Me.RecordsetClone.FindFirst "EventID = " & lngEventID

I get an error 438 - object doesn't suppor this porperty or method.

I've used this method many times before when the form was based on a DAO recordset. Is there a white paper on this? Is there an alternative? I can't use the bookmark, because I'm trying to remember record locations after the data has been requeried.


FindFirst is a DAO method. ADO has a Find method.
 
Diana
Thanks for your help. I worked on it last night for another hour and found that I could use the Find method. But I ran into another problem. How do I get the EventID from the previous record. The data is on a subform displayed in datasheet view. The user can sort the columns any way they want to. My EventID is the PK. I tried using the Recordset.MovePrevious, but that doesn't take me to the record above the the one that is selected. I tried using absoluteposition

Any ideas on how to get the EventID for the previous record no matter how the columns are sorted

Thanks
Mike
 
Back
Top