How to use ID to fill in other cells in a form

A

AHassan

Hi
My problem is that i cant find a way to link my employees table with my form
such that when i type in the employee ID the employee name, job title,country
etc are automatically filled in the form, from the employees table, which
contains full records of the employees. Please give example with the employee
name

Any help using VBA or otherwise appreciated,
Ahmed Hassan
 
G

Golfinray

Insert a combo box and allow the combo box wizard to assign ID as the record
source. Now right click the combo box, go to events, find the afterupdate
event and click the little button on the right. Start the code builder and
type:
Me.Filter = "[ID] = """ & Me.combo# & """"
Me.filteron = true
The combo box number will be listed, like combo10 or combo 21.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top