Automatically filling in control based on another control's value

  • Thread starter Thread starter Graeme
  • Start date Start date
G

Graeme

I am trying to find out how to have a form control
automatically fill in it's value based on a value chosen
from a separate combo control. For example, I want to
chose a property name in a combo control and then have it
automatically fill in the separate control for property id
based on data in a table that stores both the property
name and id fields.

I know it is probably really simple but it's late in the
day and I am having problems trying to work this one out.
 
Graeme,

Use the Before Update or On Change event of the combo box to run a Macro
utilising action SetValue, arguments: Item > The name of the control to be
filled, Expression >
DLookup("[Property_id]","tblProperties","[Property_Name]=[Forms]![FormName]!
[Property_Name]")
substituting with the actual fierlds, table, form and control names.

HTH,
Nikos
 
Back
Top