Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003

    Unanswered: Fill in information based on table

    Quickie question for a newbie here...

    Let's say I have two fields on a form, one for Account Number and other for Account Holder. The user has to manually select from the Account Number combo box the Account Number.

    What I want is the Account Holder Box to automatically fill itself based on that value.

    I already have the table with the list of accounts/holders.

    Thanks for the help

  2. #2
    Join Date
    Sep 2004
    Reston, VA
    You should make sure that the Row Source for your combo box is that table with the accounts/holders, or a query based off it that only shows those two fields.

    If your table/query is just the two fields, do this:

    1. Make sure the Account Number is column 1, Account Holder column 2
    2. Set the Row Source of the combo box to that table/query
    3. Set Bound Column = 1
    4. Set Column Count = 2
    5. Set Column Widths = whatever the best width is to see both fields when the combo box is opened, i.e. 1";1"
    6. In the Account Holder textbox Control Source, put this:


    Though the Holder is in column 2, the iteration in code starts from 0, so you should use 1. It should change every time you change the combo box now.

    Or you can put this in the Change event for the combo box, if you don't want the textbox bound directly:

    textbox_name = combobox_name.Column(1)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts