GETTING DATA BY ID NUMBER

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

Guest

I WANT TO ENTER AN ID FOR SOMEONE AND GET ALL HIS INFORMATION IN THE SAME
FORM I AM USING
 
So you want to enter the id into an unbound box, and have the form move to
that person's record?

There is a Combo Box wizard that puts a combo on your form. Or you can use
the code in this article:
Using a Combo Box to Find Records
at:
http://allenbrowne.com/ser-03.html
You can use the code in that article with a text box instead of a combo if
you prefer.

(Suggestion: See if your keyboard has a CapsLock key. We prefer you don't
shout at us.)
 
Place an unbound control (a control where a ControlSource is not
specified) on the form and add the code below to the form. As long as
the record that you're looking for is returned by the forms recordset,
it'll work.

Private Sub [controlName]_AfterUpdate()

Me.FilterOn = False
Me.Filter = "lngTransportId = " & Me.txtGotoRecord
Me.FilterOn = True

End Sub
 
Back
Top