Using MS Access/Combo Box
Expert: Richard Rost - 7/8/2009
QuestionI currently trying to make two combo boxes synchonize where one updates based on the selection from the previous. I'm using the source code beneath but when I run the form the second box shows as blank. Is there a different way to accomplish this goal or is there something wrong with my programming?
Private Sub txtAreaSearch_AfterUpdate()
Me.txtBuildingSearch.RowSource = "SELECT Building FROM" & _
" [qry Building Name] WHERE AreaName = " & _
Me.txtAreaSearch & _
" ORDER BY Building"
Me.txtBuildingSearch = Me.txtBuildingSearch.ItemData(0)
End Sub
AnswerI get asked this question all the time. You've got two or more combo boxes and you want the first one to filter the second one. I get asked this so much that I recorded a video tutorial explaining how to do it:
http://599cd.com/tips/access/two-combo-boxes?key=AllExperts
Let me know if you have any other questions or comments.
Also, be sure to visit my web site and watch my FREE 90-minute MICROSOFT ACCESS VIDEO TUTORIAL. Go to
http://www.599cd.com/Access/AllExperts
Cordially,
Richard Rost
599CD Computer Training
http://www.599cd.com
P.S. Also, don't forget to visit my FREE Microsoft Access Tips & Tricks Page at
http://www.599cd.com/Tips/AllExperts
P.P.S. I volunteer my time at AllExperts to help people, and I get a LOT of questions, so I can't take an hour to answer each question. If you need more DETAILED HELP, come to my TechHelp web site at
http://www.599cd.com/TechHelp/AllExperts and I'll take as much time as you need to answer your question.
http://www.599cd.com/Microsoft_Access_Tutorial?key=AllExperts
Out of work? Know someone who is? Get a FREE copy of my Computer Job Skills CD at
http://www.599cd.com/JobSkills?key=AllExperts