I figured it out. Thanks!
On Nov 14, 4:24*pm, Sean Timmons
<SeanTimm...@discussions.microsoft.com> wrote:
> Try this
>
> Private Sub State_Name_Change()
> Dim strSQL As String
> strSQL = "SELECT DISTINCT [CityTable].[City] FROM [CityTable]" & _
> "WHERE [State] ='" & Me.[State] & "' ORDER BY [City]"
> Me.[City].RowSource = strSQL
> End Sub
>
> Assuming state_Name is your combo box name, CityTable is your table with
> states and cities.
>
> "lecough...@gmail.com" wrote:
> > I have created a form with a combobox that contains a list all 51
> > states. *I also have a list box that contains all of the states and
> > their counties. *If the user selects "Massachusetts" from the
> > combobox, I would like the listbox to only show counties in
> > Massachusetts. *How would I go about doing this?
>
> > Thanks in advance.
|