Results 1 to 4 of 4
  1. #1
    ermcc is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    6

    RowSource question

    I am using (2) combo boxes. The second is a requery from the first. As you can see in the code below, I am getting "PartNumber" in the second combobox. I have several fields setup in the second combobox. How do I get multiple fields to come out in the second combobox? Is there a way to add multiple fields to RowSource or do I need to do this differently?

    Thank you...

    Private Sub CboCustomer_AfterUpdate()
    Me.ComboComplaint.RowSource = ""


    DoCmd.OpenQuery "clear_combobox_table"
    DoCmd.OpenQuery "combobox_sort"
    Me.ComboComplaint.RowSource = "Select PartNumber From Combobox"
    CboCustomer.Requery
    End Sub

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    In the Properties Sheet -> Format Tab -> use the Column Count property.
    I have a combo box showing two fields and the Column Count is set to 2.

    Hope this helps.

  3. #3
    ermcc is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    6
    I have the column count set to 17. I want use all 17 fields, but the rowsource command is only giving me one field. That is the problem.

  4. #4
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    I just did a real quick test Combo Box on a Test Form. I used the Combo Box Wizard to set it up with 4 fields.
    It all worked really well.

    Does your Row Source for the Combo Box in which you want to see multiple fields have a 'Select' statement that selects all the fields you need to see?
    For instance, this:
    Code:
    Me.ComboComplaint.RowSource = "Select PartNumber From Combobox"
    would only return the PartNumber for display in the ComboCompliant box.

    If you wanted it to show more fields, you would do something like this:
    Code:
    Me.ComboComplaint.RowSource = "Select PartNumber, Field2, Field3, Field4  From Combobox"
    Hope this helps!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Updating listbox rowsource not working
    By j2curtis64 in forum Forms
    Replies: 13
    Last Post: 12-07-2011, 01:46 PM
  2. .RowSource Combo
    By white_flag in forum Access
    Replies: 1
    Last Post: 09-06-2011, 07:59 AM
  3. RowSource Value not writing to the Table
    By tbassngal in forum Queries
    Replies: 5
    Last Post: 09-03-2011, 12:16 PM
  4. combobox rowsource
    By dirkvw in forum Forms
    Replies: 3
    Last Post: 06-20-2011, 05:12 PM
  5. SQL Rowsource
    By DSTR3 in forum Queries
    Replies: 2
    Last Post: 12-06-2010, 11:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums