> I would like to refine my abilities to search within the records with a
> command button in form view. I need it to only search in the PRIMARY KEY
> field. not in the field which the cursor is in...
How does Access KNOW which PK value to go to?
Using an InputBox?
If the PK field is a Number datatype then, for example:
Me.RecordsetClone.FindFirst "[PKFieldName] =" & InputBox("What
value?")
Me.Bookmark = Me.RecordsetClone.Bookmark
If the PK field is a Text datatype, then:
Me.RecordsetClone.FindFirst "[ID] = '" & InputBox("What value?") & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
You can adapt the above to a Control on a form to input the value to
be searched for...
Me.RecordsetClone.FindFirst "[PKFieldName] = " & Me![ControlName]

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
DrewBe - 31 Jul 2007 01:24 GMT
That works slick as a whistle ... Thank you fredg.