Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    254
    Thanks
    0
    Thanked 0 Times in 0 Posts

    On Current with Combo box (Access 2000)

    The users want to see both fields on the form, but my combo box only shows one field when it is closed.When a combo box is closed
    only one column's value is displayed. Since the value of the first column has a width = 0, i want to show this value in another control box,
    called IDCustomer.
    How can i achieve it in the OnCurent event of the form ?

  2. #2
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: On Current with Combo box (Access 2000)

    You can use the combo's .Column position in a couple of ways here.

    1 You can set an unbound text field next to the combo and use "=Mycombo.Column(1)" (Without the quote marks"")
    in the control source for the text.
    Changing MyCombo to the name of your combo.

    or

    2 You can set 2 unbound texts and use "=Mycombo.Column(0)" for the first text and "=Mycombo.Column(1)" for the second text.
    When the selection changes, from the combo, the texts will reflect the chosen contents.
    Same quotation marks rule applies.

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: On Current with Combo box (Access 2000)

    Another solution is to use an expression that combines 2 columns. For example, let's assume that your current combo box has the CustNo as Column 1 and the CustName as Column 2. Current your recordsource is "Select CustNo,CustName from tblCustomers". Instead, do this "Select CustNo, CustName & " (" & CustNo & ")" as Exp1 from tblCustomers". The combobox then would show this: Data Magic (1234)
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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