Results 1 to 3 of 3
  1. #1
    MTSPEER is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    283

    Combobox criteria from another combobox

    Hello,

    I have a combo box(cmboQueue) with values in it based on a query from the row source. And I want to put in another combo box where I will have to create another query based on what the value is selected in cmboQueue. Is that possible? Do I do that in the row source of the new combo box?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,523
    combo 2 source uses combo1 as criteria in the query
    but you must refresh combo2 when combo1 is chosen....

    cboStates has all state names. When user picks a state, the cboCity must be refreshed
    cboCity.rowsource = qsCities1State
    sql= select City from tCities where [state]=forms!myForm!cboState

    Code:
    '----------------
    sub cboState_Afterupdate()
    '----------------
    cboCity.requery
    end sub

  3. #3
    MTSPEER is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    283
    What if I wanted to pull it from multiple fields? For example just for some reason I had cities in multiple fields and I have one state field. is that possible?

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

Similar Threads

  1. Replies: 1
    Last Post: 01-16-2015, 09:28 AM
  2. Replies: 7
    Last Post: 11-11-2014, 06:10 PM
  3. Replies: 1
    Last Post: 09-06-2011, 01:47 PM
  4. Replies: 0
    Last Post: 08-24-2010, 06:38 PM
  5. Replies: 0
    Last Post: 12-16-2009, 01:14 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