Jump to desired record

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Hi

I'd like to open a new form. After that the record with the ID # 4 should be
selected. I tried to do it with the foowing script, but it fails.


Dim f As Form
DoCmd.OpenForm "F_Test"
Set f = Forms!F_Test
f.RecordsetClone.FindFirst "ID=4"
f.Bookmark = f.RecordsetClone.Bookmark


What am I doing wrong?

Tom
 
Hi,
On what line does it fail?
Or do you mean it simply does nothing?
Have you stepped through it?
Is ID a valid field and is it's data type numerical?

I don't see anything wrong with your code, in fact I tried it out and it works.

Dan Artuso, MVP
 
Back
Top