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!

Easy. Need to display name after keying in ID.

Status
Not open for further replies.

dewsbury

Technical User
Sep 24, 2003
4
IE
Greetings from Dublin!

This must be so easy but I can't figure it out.

I have one table with fields of employee number, employee name , address, phone number.

I want a new FORM where I key in the employee number and THEN the employee name is displayed automatically. What properties do I give to the form and individual fields.

(I don't want to scroll or search for the name.)
 
I would use a combo box to enter the employee number. You could then use a text box to display the name with a control source like:
=cboEmpNum.Column(1)

Otherwise, you could use a control source like:
=DLookup("[Employee Name]","[one table]","[Employee Number]=" & txtEmployeeNumber)

Your situation may vary since you haven't provide actual table, field, and control names or data types.

Duane
Hook'D on Access
MS Access MVP
 
I believe you can do this with the wizards access provides. Just make a form using the wizard (I would select justified in this wizard, but that's just personal taste). Then go to design view, make sure the control wizards are enabled, and make a combobox. When you are going through that wizard choose "Find a record on my form...."


Then, choose the appropriate settings as it guides you. Now that form will navigate to the record specified by your combobox (which you have set to use the employee number)

One last thing: Sometimes I wonder; "Is that someone's signature? Or do they type that at the end of each post?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top