Results 1 to 4 of 4
  1. #1
    dccjr3927 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    130

    Query into 2 Column Combo Box


    Hello. I am having a problem using a query to fill a 2 column combo box. My two fields (ProcessCode and ProcessName) are in the table ComboBoxes. I tried just assigning the RowSource to an SQL statement as follows:
    Code:
     Me.cbxProcess.ColumnCount = 2 Me.cbxProcess.RowSource = "SELECT ProcessCode, ProcessName FROM ComboBoxes" Me.cbxProcess.Requery
    But this yielded no result. If this is not a viable way, I was thinking that I might need to query into a recordset, convert the recordset to an array, and the use the array to populate the combo box. I am just not sure how to go about this (or if there was another way). Any assistance would be greatly appreciated. Stay safe and healthy.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    No on the recordset/array path.

    Normally this would be set at design time, unless the contents changed based on some other factor. The code you showed should work, depending on the event it was in. You may also need to set the column widths. What does "no result" mean exactly?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    dccjr3927 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    130
    Fixed. It was a wrong setting in the combo box properties. Thanks for the assistance/reassurance. It is nice to know that I was on the right track, just blind to something small. Should have checked that first. Lesson learned.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Glad you got it sorted.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 2
    Last Post: 07-03-2017, 09:10 AM
  2. Replies: 5
    Last Post: 05-31-2017, 08:58 AM
  3. Replies: 12
    Last Post: 02-15-2016, 11:10 AM
  4. Replies: 4
    Last Post: 12-29-2015, 03:25 PM
  5. Query Critieria using Combo Box Column
    By MintChipMadness in forum Queries
    Replies: 1
    Last Post: 08-23-2012, 02:10 PM

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