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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

not unique names

Status
Not open for further replies.

patfee

Programmer
Dec 14, 2004
78
NL
Hi,

I have a NAME of a unit which is based in a COUNTRY.
The NAME is unique, and obviously not the COUNTRY is not

Both the NAME and the COUNTRY are storred one single TABLE

a LISTBOX-1 is filled with the unit NAME and a LISTBOX-2 is filled with the COUNTRY. Both listboxes are based on a query on the TABLE

I would like to use both listboxes to select either the NAME or the COUNTRY.

So if i select the COUNTRY from LISTBOX-2, only the units available in this country should visible.

If one makes the COUNTRY selection there are no problems.

but starting with a DIRTY form (no selection is made yet) the COUNTRY 1 apprears multiple times since there are many different UNITS location in this country

I have been wrestling with the Distinct and distinctrow statements without success

Could someone advise on how i could manage show a COUNTRY once if no selection is made (i.e. on form load or on filter clear action)

Thanks very much

Patrick
 
Try using a "SELECT UNIQUE country from tblcountry" in the query for the Country ListBox where country is the field name and tblcountry is the table name. Haven't tried it myself but seems like it might do the trick.

TwoOdd
--------------
Good judgment comes from experience, and experience comes from bad judgment.
-- Barry LePatner
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top