Cascading Combo boxes using CASE command



I tried setting up a cascading combo box between countries and cities i.e
based on the country u select , you can view the appropriate cities in the
other combo box.
I tried using CASE command in 'after update' of country combo box:

Private Sub cboCountry_AfterUpdate()
On Error Resume Next
Select Case cboCountry.Value
Case "France"
cboCity.RowSource = "tblFrance"
Case "United Kingdom"
cboCity.RowSource = "tblUnitedKingdom"
Case "United States"
cboCity.RowSource = "tblUnitedStates"
End Select
End Sub

This works fine but now I need 'cities' combo box to be in SubForm. So based
on the option I select in Countries [on MainForm] I should get the
appropriate cities [on SubForm] by using CASE function...Any help
.



Relevant Pages

  • Re: Need If-Then-Else or Similar Construct in Test for Null Value
    ... new table by including both City and State columns. ... You should then have a Cities table with columns ... The query below inserts rows into the Countries table with unique ... ContactEmployers table as that table references the Employers table. ...
    (microsoft.public.access.queries)
  • Re: Help with Euro Travel Plan :-)
    ... route through countries is pretty geographically logical, ... keep costs down, planes are cheaper to capital cities, and Youth Hostels ...
    (rec.travel.europe)
  • Re: Gas Price Comparison Idiots
    ... >other countries have cities designed more for foot-traffic efficiency. ... five, ten, twenty, fifty miles from where you work. ... Living in America requires ...
    (talk.politics.misc)
  • Re: My Plan To Stop Muslim Terrorism
    ... countries in the mid-east. ... Each cities name would be put into a hat and not revealed. ... they think we're bluffing). ... Yours is a perfectly logical and sound plan. ...
    (alt.politics)
  • Why PAP should debate this in Parliament.
    ... the government said it wanted Singapore to be a developed country ... Asia-Pacific region boasts world's best - and worst - cities ... Calgary - making Canada and Australia the most liveable countries based on ... The EIU ranked 127 cities on the basis of five criteria: ...
    (soc.culture.singapore)

Loading