Multiple items in combo box

BigToe

New member
Local time
Today, 11:47
Joined
May 11, 2003
Messages
8
Hi,

I'm updating a database I created a while back.

One of the fields is called "Item" and is a drop down combo box.

I wanted it to drop down a menu of all previously entered data in that field to save having to type out something that would be used quite often.

I made the "Row Source Type" a "Table/Query" and entered "SELECT Sales.Item FROM Sales;" into the "Row Source" box.

This does indeed bring up a list of all previously entered values for that field, however anything that has been entered more than once also shows up more than once in the list.

What I'd like it to do is bring up a list and cut out all the repeated data. Check out this example:-

5 records. In three records "Item" contains "DVD player" and in the other two records "Item" contains "TV". I want the list to display:-

"DVD Player"
"TV"

INSTEAD OF

"DVD Player"
"DVD Player"
"DVD Player"
"TV"
"TV"

Any help appreciated :)

Chris
 
Put the curser in the RowSource, click on the little grey button with 3 dots on it ... then modify the query behind the ComboBox as you would a normal query

Col
 
Hi Colin,

That's the problem I have - I'm a bit useless with queries and don't know how to write one that will do what I'm after :o
 
By the way, are you aware your current post count is l33t?

I'll get my coat :(
 
All you need to do is in design view of your combobox, bring up the properties for that object.

Find RowSource which will be near the top of the properties on the All tab. You'll have your SELECT ... etc in there. To the right of the box will be a button with "...". Click this and it will take you to your query. Then you need to click the Greek type E sign on the toolbar (can't remember its real name) - or alternatively you can go to View > Totals. This will place "Group By" in the design grid. This will group your totals so that you will have duplicates only display once.
 
Last edited:
Ally said:
All you need to do is in design view of your combobox, bring up the properties for that object.

Find RowSource which will be near the top of the properties on the All tab. You'll have your SELECT ... etc in there. To the right of the box will be a button with "...". Click this and it will take you to your query. Then you need to click the Greek type E sign on the toolbar (can't remember its real name) - or alternatively you can go to View > Totals. This will place "Group By" in the design grid. This will group your totals so that you will have duplicates only display once.

Thanks! That's exactly what I was looking for. :)

Colin : Sorry for the confusion, your post count was at 1337 which is the internationally approved "l33t" (elite) status on "t3h intarweb". It's a language used by many a "l33t h4X0r", which includes me when I'm feeling stupid.
 
l33t is actually the number of times you've been late for tea this week :rolleyes:
 

Users who are viewing this thread

Back
Top Bottom