Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting a combo box to auto fill next text box?

Status
Not open for further replies.

Mksmall

Technical User
Oct 18, 2001
18
US
On a form I have a combo box that lists counties. My next box list townships that are in the listed counties. Is there a way to limit the list you see in the 2nd box to only show you what townships are in the county that you selected from the first box? What I am trying to accomplish is if someone picks "Jackson" from drop down box one, then when they click on drop down box 2..all that they see are those townships for Jackson county.
 
In the AfterUpdate Event for Combo1 you would put something like this
Dim strSQL as String
strSQL = "Select TableName.Townships From TableName Where TableName.County = '" & Forms!YourForm!Combo1 & "'"
Me.Combo2.RowSource = strSQL

That should get you close

Paul
 
Hi:

There is an FAQ on this forum that describes this. (By an expert, Rick Spring.)

Heres the FAQ thread: faq702-681 Gus Brunston [glasses] An old PICKer, using Access2000.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top