General discussion


Updating controls in MS Access

By nichole0131 ·
I am trying to update a field, in a form, with information based on another field in the same form. For example, When I choose "John Doe" for the name field (a list box), I would like the "Dept" field to automatically update with John Doe's dept.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by bpaton In reply to Updating controls in MS A ...

You can do it with the Dlookup function. If "Name" and "Dept" are fields in the "Employee" table that the list box refers to, and "fname" and "fdept" are the corresponding fields on your form. Then select properties of the "fdept" field and in the control source field write the expression =DLookUp("[Employee]!dept","[Employee]","[Employee]!name=[fname]")


Related Discussions

Related Forums