hi can anybody tell me what i am supposed to do if I dont want duplicates in my combo box. I dont want it to write the number twice when its already there...
When you build the combo box through the query builder. Click on the frame which the tables are added to and right click, select properties, select unique values.
What is showing up in your combobox is controlled by the RowSource property. More than likely this is a table, query, or SQL code. A query that aggregates the multiple instances of the field in question down to just one can be done. Please post the SQL. If the RowSource is a table then post the tablename and the fields necessary for the combobox and we will provide the SQL so that you will only have one instance.
Bob Scriver
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???
this is what is said in the row source:
SELECT [Property].[ID], [Property].[Property_Severity_Class] FROM Property;
so right now it shows something like:
IV
IV
III
II
it reads of course from a table so i guess it takes all the different types... now... how can i stop the duplicates besides from breaking the numbers to a single table.
sweden stockholm
sweden norrköping
germany hamburg
denmark kopenhagen
this is the thing... i dont want two swedens to be shown in the combo box just because the country appears two times in the table... hope ive explained better this time
the thing is.. if i did this after what i wanted i would create a table just for countries... but the thing is.. the person that asked me to do this want the information on one table.. thats why the country appears more than once...
SELECT DISTINCT Environment.ID, Environment.Environment_Severity_Class
FROM Environment
ORDER BY Environment.Environment_Severity_Class;
If this is your SQL the reason you have more than one record for ID is that there is more than one Environment_Severity_Class value for the multiple instances of ID. If you want ID to be Distinct then eliminate the second field.
SELECT DISTINCT Environment.ID
FROM Environment
ORDER BY Environment.ID;
Bob Scriver
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.