Can I fill a combobox based on another combobox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can I fill a combobox based off of the selection in another combobox? I have
a student info database that has a school district field (it can be filled by
choosing and item in the list from a lookup to another table) and a school
name field (it contains a lookup list from a table that contains all school
in all districts). When I choose which district in the District combobox, I
would like the Name combobox to only list the schools that are in the
selected district.
Thanks for your help, Scott
 
Do a search - asked and answered very very often.

Look for the keywords "cascading combo".
 
You can create a filter in the second combo RowSource that refer to the first
combo

Select FieldName1 , FieldName2 From TableName Where FieldName3 =
Forms![MainFormName]![ComboName]

On the After update event of the first combo you need to run this line of
code to refresh the RowSource in combo2

Me.[Combo2Name].Requery
 
Back
Top