List or Combo Boxes

  • Thread starter Thread starter Joe Gieder
  • Start date Start date
J

Joe Gieder

I have a table that currently has several hundred
records. I'm trying to create a list or combo box that
will show the values for a certain field (Plant), the
problem is that there are only 10 plants but the values
show many many times in the box. How can I get my list or
combo box to show only one occurance of the value without
creating another table or query?

Thanks in advance for your help.

Joe
 
Joe,
When creating the Record Source for Combo Box or List Box use the Word
Distinct

Example Select Distinct Plant from tablename

Hope this helps
Dib
 
Hi Dib,
Thanks for the information but I guess I'm sure where it
goes. I added "distinct" to the Row Source and ended up
with "SELECT DISTINCT [BUYER INFORMATION].[BUYERS
NUMBER], [BUYER INFORMATION].[Plant] FROM [BUYER
INFORMATION];" but when I open the box I get all the
values not just the unique ones. What could I be doing
wrong? Please help...

Thanks
Joe
 
Did you try to get just the Plant information only and see if you are
getting duplicate values?. if you don't then the other fields are what
causing the duplication.



Hi Dib,
Thanks for the information but I guess I'm sure where it
goes. I added "distinct" to the Row Source and ended up
with "SELECT DISTINCT [BUYER INFORMATION].[BUYERS
NUMBER], [BUYER INFORMATION].[Plant] FROM [BUYER
INFORMATION];" but when I open the box I get all the
values not just the unique ones. What could I be doing
wrong? Please help...

Thanks
Joe
-----Original Message-----
Joe,
When creating the Record Source for Combo Box or List Box use the Word
Distinct

Example Select Distinct Plant from tablename

Hope this helps
Dib




.
 
What this means is that you have different values of BUYERS NUMBER for the
same Plant. As such, your query is correctly returning every BUYERS NUMBER
value for each Plant. So, if you just want to show the Plant list in the
combo box and nothing else, then try this query:

SELECT DISTINCT [BUYER INFORMATION].[Plant] FROM [BUYER INFORMATION];

--

Ken Snell
<MS ACCESS MVP>

Hi Dib,
Thanks for the information but I guess I'm sure where it
goes. I added "distinct" to the Row Source and ended up
with "SELECT DISTINCT [BUYER INFORMATION].[BUYERS
NUMBER], [BUYER INFORMATION].[Plant] FROM [BUYER
INFORMATION];" but when I open the box I get all the
values not just the unique ones. What could I be doing
wrong? Please help...

Thanks
Joe
-----Original Message-----
Joe,
When creating the Record Source for Combo Box or List Box use the Word
Distinct

Example Select Distinct Plant from tablename

Hope this helps
Dib




.
 
That's it. The Buyers Number was causing the problem.
When I got rid of it and changed the column count to oe
it fixed everything.

Thank you both for the help.
-----Original Message-----
Did you try to get just the Plant information only and see if you are
getting duplicate values?. if you don't then the other fields are what
causing the duplication.



Hi Dib,
Thanks for the information but I guess I'm sure where it
goes. I added "distinct" to the Row Source and ended up
with "SELECT DISTINCT [BUYER INFORMATION].[BUYERS
NUMBER], [BUYER INFORMATION].[Plant] FROM [BUYER
INFORMATION];" but when I open the box I get all the
values not just the unique ones. What could I be doing
wrong? Please help...

Thanks
Joe
-----Original Message-----
Joe,
When creating the Record Source for Combo Box or List Box use the Word
Distinct

Example Select Distinct Plant from tablename

Hope this helps
Dib

"Joe Gieder" <[email protected]>
wrote
in message
I have a table that currently has several hundred
records. I'm trying to create a list or combo box that
will show the values for a certain field (Plant), the
problem is that there are only 10 plants but the values
show many many times in the box. How can I get my
list
or
combo box to show only one occurance of the value without
creating another table or query?

Thanks in advance for your help.

Joe


.


.
 
Back
Top