Question Searching by County/Region/Country etc How?

CarysW

Complete Access Numpty
Local time
Today, 23:24
Joined
Jun 1, 2009
Messages
213
I think I'm being a bit dim, but I'm self taught with Access so do sometimes struggle so;

I have a list of customers and their stores(over 1500) - I want to set up a quick reference type 'local store' search. The entries all have Town, County, Region and Country. The end user may want to search by any of these - what's the easiest way of doing it?

I'm using Access 2007.
 
Lookup "search form" and see if that gets you started.
 
Go downwards:

1st Combi Country
2nd Combi Region
3rd Combi County

I do it Global Region and Country so here's how Country is handled:

Code:
Function LookupCountry()
Dim MyControl As Control
        Set MyControl = Screen.ActiveControl
    With CodeContextObject
        MyControl.RowSource = "SELECT CountriesQuery.Country, CountriesQuery.[Country Desc], CountriesQuery.[Country Region Ref] FROM CountriesQuery WHERE CountriesQuery.[Country Region Ref]= '" & .[Region] & "' ORDER BY CountriesQuery.[Country Desc];"
        Call ListDisplay
    End With
End Function

ListDisplay dropsdown the list if null.

I use a function as it can re-used. On the control on Enter:

Code:
Function ClientsDialogueOverseas_CountryEnter()
DoCmd.Requery "Country"
Call LookupCountry
End Function

Simon
 

Users who are viewing this thread

Back
Top Bottom