Results 1 to 5 of 5

Thread: Combo Box Link

  1. #1
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post
    I have a combo box on a form that presents a drop down list for selection of a field (Group) from a table. That part works normally.
    In a report called from the form I have been trying to put the selected Group in the header with the following code:

    =Forms!frmMainMenu!cboGroup

    What shows up is the ID number of the desired record, not the associated field. In other words I'm getting field 1 of the record instead of field 2. I must be missing something here and any help would be appreciated.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Make sure that the Row Source of the combo box includes the ID and the field that you want to display.
    Set the Column Count property of the combo box to 2.
    Set the Column Widths property to 0";1"

  3. #3
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post
    I believe I have the combo box set up as you recommended (see attachment). It works perfectly on the form, but when calling the report from the form I still get the ID number instead of the second field.
    Attached Images Attached Images

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    [s]Have you set up the combo box on the report this way too?[/s]

    Does this work in the control source of the text box on the report?

    =Forms!frmMainMenu!cboGroup.Column(1)

  5. #5
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post
    That works. Thanks a bunch.

Posting Permissions

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