Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2002

    Unanswered: Binding Two Columns of a ComboBox

    How do you go about binding multiple columns of a combobox to seperate objects? For example, one column would be bound to a text box and the other to another combobox. Seems that I can only bind either/or in the Bound Column dialog. Any suggestions?

  2. #2
    Join Date
    Oct 2002
    NSW Australia
    Do you want to limit your Combobox or to store values in 2 seperate fields ?

    To limit your box you need to put both fields in your rowsource/query.

    To store the value in 2 fields you need to use a little code to set the value of the fields based on your combobox.

    Private Sub YourComboBox_AfterUpdate()
    me.yourtextboxname.value = me.YourComboBox.column(x)
    'replace x with the column no. in your combobox
    end sub



  3. #3
    Join Date
    Dec 2002
    It's more like I have a combobox with 2 columns, one is hidden with the ID primary key and the other visible showing names. The ID key is linking the box to another combobox but I also want the other text column bound to a text box to show that same text. When it's bound in a fashion to allow the 2nd combobox to work the text box shows the ID key, and when I bound the column so that the text box shows the text the combobox does not function properly, how can I bound both columns each to a different object?

Posting Permissions

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