Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

auto populating a field on a form

Status
Not open for further replies.

Starrizzo

Technical User
Mar 22, 2004
30
0
0
US
I want to be able to type in an employees ID and have the first name and last name field to auto populate on a form. Is there an easy way to do this?
 
you could use the dlookup() function
 
well im sorta new at this and dont know exactly how to use the dlookup.
 
this is from the DLookup Function in access help:

The next example from the Shippers table uses the form control ShipperID to provide criteria for the DLookup function. Note that the reference to the control isn't included in the quotation marks that denote the strings. This ensures that each time the DLookup function is called, Microsoft Access will obtain the current value from the control.

Dim varX As Variant
varX = DLookup("[CompanyName]", "Shippers", "[ShipperID] = " _
& Forms!Shippers!ShipperID)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top