Access Combo Box

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael Kintner

    #1

    Access Combo Box

    I have a combo box the three columns. After the combo box has been selected
    how can I get the data from the third column but show only the first column
    after selected.

    Example: Combo box drop down displays Name, Descr, Cost. I want to show
    the name and put the Cost into a label after selected.

    I can display the name, but can't seem to find out how to get the data from
    the third column through the on change event.

    Thank you in advance,
    Mike


  • Rick Brandt

    #2
    Re: Access Combo Box

    Michael Kintner wrote:
    I have a combo box the three columns. After the combo box has been
    selected how can I get the data from the third column but show only
    the first column after selected.
    >
    Example: Combo box drop down displays Name, Descr, Cost. I want to
    show the name and put the Cost into a label after selected.
    >
    I can display the name, but can't seem to find out how to get the
    data from the third column through the on change event.
    >
    Thank you in advance,
    Mike
    Me!ComboBoxName .Column(2)

    --
    Rick Brandt, Microsoft Access MVP
    Email (as appropriate) to...
    RBrandt at Hunter dot com


    Comment

    • Tim Marshall

      #3
      Re: Access Combo Box

      Michael Kintner wrote:
      Example: Combo box drop down displays Name, Descr, Cost. I want to show
      the name and put the Cost into a label after selected.
      >
      I can display the name, but can't seem to find out how to get the data from
      the third column through the on change event.
      Hi Mike,

      Rather than use the label you mention, what I find easiest is to use a
      text box with the following controlsource (where cboComboName is the
      name of the combo box):

      =[cboComboName].[column](2)

      Note that in column numbering in a combo box (and a list box too, BTW),
      the first column is 0.

      If you want to make the text box behave like a label, ie, can't select
      anything, you can always make enabled no and locked yes.

      --
      Tim http://www.ucs.mun.ca/~tmarshal/
      ^o<
      /#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
      /^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me

      Comment

      Working...