Search for record and auto populate the remaining fields

jkmb

New member
Local time
Today, 08:25
Joined
Sep 5, 2012
Messages
7
I am new to access. No clue about VBA. I searched the forum and could not get an exact answer. If the answer is available in any thread, please post the link.

I have a table with employee details such as employee id, employee name, employee designation and phone. A combo box is created in a form with drop down list of available employee id. When the user picks/selects an employee id from the drop down list, the form should retrieve the remaining 3 fields (namely employee name, designation and phone) and populate this in the boxes corresponding to each one. Screen snap shot is attached. Is this possible without VBA.
 

Attachments

  • view employee data.jpg
    view employee data.jpg
    31.9 KB · Views: 123
Last edited:
No Screen shot is attached.. It is possible through VBA.. All you need is the Combo Box After Update event.. But before that.. is the combo box unbound? Is the other fields unbound?
 
Screen shot is attached now.
I do not know the difference between keeping the combo box unbound(delete the caption name in property sheet) or with the caption name.
 
When you want to show data from multiple tables, create a query that joins the tables and use that as the RecordSource for a form. Then when you select the EmployeeID from the combo, the other fields will populate as if by magic. When you use technique it is usual to lock the controls that display the lookup data so they can't be accidentally changed.
 

Users who are viewing this thread

Back
Top Bottom