Can I fill a combobox based on another combobox

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
 
R

Rick B

Do a search - asked and answered very very often.

Look for the keywords "cascading combo".
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Report Setup 3
Ranking question 3
ComboBox on a UserForm 2
update imported records with different criteria 3
fill a field from a combobox 7
ComboBox 1
comboBoxes on a userform 1
Linked Fields not populating 2

Top