Dear all.
I am no expert at access but have managed to successfully code what Ive needed so far using the 'move' commands.
However, the findfirst command will allow me to find the first record meeting a condition I set- but I cant seem to get it working.
I basically want to find the first record under the 'race_num' field that is equal to 2332.
Ive tried .findfirst "race_num = 2332" but its not worked
(Im working from a wrox access2000 book)
My code is below:
Sub trying_out_seek()
Dim rec As Recordset
Dim db As Database
Set db = CurrentDb()
Set rec = db.OpenRecordset("RI_test0305", dbOpenDynaset)
rec.FindFirst "race_num = " & 2332
Debug.Print rec(5)
End Sub
PS. I get a run-time error 3464
I would be very grateful if anyone can help me out.
Best Wishes,
Graham , England
I am no expert at access but have managed to successfully code what Ive needed so far using the 'move' commands.
However, the findfirst command will allow me to find the first record meeting a condition I set- but I cant seem to get it working.
I basically want to find the first record under the 'race_num' field that is equal to 2332.
Ive tried .findfirst "race_num = 2332" but its not worked
(Im working from a wrox access2000 book)
My code is below:
Sub trying_out_seek()
Dim rec As Recordset
Dim db As Database
Set db = CurrentDb()
Set rec = db.OpenRecordset("RI_test0305", dbOpenDynaset)
rec.FindFirst "race_num = " & 2332
Debug.Print rec(5)
End Sub
PS. I get a run-time error 3464
I would be very grateful if anyone can help me out.
Best Wishes,
Graham , England