Results 1 to 3 of 3
  1. #1
    rwahdan@gmail.com is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2015
    Posts
    28

    Populate combo box based on selection of other combo box


    I have 2 tables one have grades 5-8 and the other have sections for each grade. I want after selecting the grades from first combo box to update the data in the second combo box to have the values of the sections for the grade selected.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    combo 2 query looks at combo1 for criteria:
    select * from table where [field]=forms!myForm!cbo1

    so when user picks combo1, just refresh cbo2:
    Code:
    sub cboBox1_afterupdate()
    combo2.requery
    end sub

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

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

Similar Threads

  1. Replies: 25
    Last Post: 01-25-2013, 10:26 AM
  2. Replies: 1
    Last Post: 07-11-2012, 08:36 AM
  3. Replies: 33
    Last Post: 01-13-2012, 07:44 AM
  4. Replies: 4
    Last Post: 01-24-2011, 07:11 PM
  5. Replies: 2
    Last Post: 12-07-2010, 12:32 PM

Tags for this Thread

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