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!

combo box accurances

Status
Not open for further replies.

metalman

Programmer
Sep 17, 2001
35
US
i have an access 2000 data base and need to read the location code. but each location is listed several times how in vb can i get the combo box to show only one accurance of the location code. to where the user can select a specific location. there are 30 locations.
in the database it is in the table header and the F2 column. have the combo box bound to the database.
 
If the combo box is being used as a bound control, then its the job of the SQL SELECT statement to bring back a set of unique records.

You could use something like

SELECT DISTINCT LocationCode FROM Table

If you are loading the combo box manually then your code must make sure that you are loading the same value twice. This will be more complex.

Let me know how you are populating the box, and we can figure out a way of de-duplicating the values.

Andy.
 
it it being populated through the select staement but it shows all the locationcaodes in order.
example if BGU had 500 transactions the combo box will show 500 location codes instead of just one.

will try the select distinct and i do thank you for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top