How do I populate a second field based on a combo box selection?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kanapaha
    New Member
    • Sep 2010
    • 3

    #1

    How do I populate a second field based on a combo box selection?

    The table is tblOfficeLocati ons, which has 3 fields; Office_Code, Office_Name and State_Country. When I select the [Office_Code] in cboLocation, I want the [State] field to autopopulate with the State_Location.

    Thanks in advance!
  • Stewart Ross
    Recognized Expert Moderator Specialist
    • Feb 2008
    • 2545

    #2
    Hi. We have an insights article on Cascading combo/list boxes which takes you through the steps needed to do this kind of task, assuming that you want to filter one combo by the value of another.

    If you just want to set the value of a field depending on what the user has selected in the combo, use the after-update event of the combo to set the control concerned to the value of the relevant column in your combo.

    -Stewart
    Last edited by Stewart Ross; Sep 10 '10, 09:55 AM.

    Comment

    Working...