Error 3251, Please Help!

Alias

New member
Local time
Today, 07:11
Joined
Aug 25, 2004
Messages
7
I just upsized a Access2000 DB to SQL2000. However, I am getting an 3251 error. Can anyone tell me why and what I need to do to make this code work.
Thank you so much.

Dim db As Database
Dim rA As Recordset
Dim rF As Recordset

Set db = CurrentDb
Set rF = db.OpenRecordset("tDatHelicopterTimeFields")
Set rA = db.OpenRecordset("tDatHelicopterTimeFieldsByAct")
GoSub Proc_SetAllMatches
Set rF = db.OpenRecordset("tDatHelicopterTotalFields")
Set rA = db.OpenRecordset("tDatHelicopterTotalFieldsByAct")
GoSub Proc_SetAllMatches
Set rF = db.OpenRecordset("tDatHelicopterSourceFields")
Set rA = db.OpenRecordset("tDatHelicopterSourceFieldsByAct")
GoSub Proc_SetAllMatches
Exit Sub
Proc_SetAllMatches:
rA.Index = "ByFields" 'Cannot get pass this 3251 error.
rF.MoveFirst
While Not (rF.EOF Or rF.BOF)
rA.Seek "=", rF![Fields]
If Not rA.NoMatch Then
Me.Controls(rF![Fields]).BackColor = 8454143
End If
rF.MoveNext
Wend
Return
 
Possibly the index bit is not supported??


Anyway - wouldn't it be easier to use a join or two in an Sql statement?


Vince
 
most probably you have a missing reference. search this forum for references.
 
Thanks for the suggestions. I'll do some more research and see if I can find some answers. If anyone else have any other suggestions, please feel free to comment.

Thanks!!!
 
Alias,

I don't think the .Index & .Seek method works with linked tables.

You can build your sql for the recordset with the Where clause.

Probably would be faster than having the whole table as the recordset.

Wayne
 

Users who are viewing this thread

Back
Top Bottom