Combo Boxes

  • Thread starter Thread starter russell_piper
  • Start date Start date
R

russell_piper

Guest
Hello there. My first time on here so I am not sure whether I am in the right place. I wish to create a combo box in a form but for the life of me cannot remember how to do it. I only have two variables but evertime I enter one using the wizard it is calling up all of the other occurences of the names e.g. In my table it says "who walks the dog" and the two names are either russell or david. When I have finished the combo box instead of having the two choices of Russell and David I have every single occurence of Russell and david in all of my records. How can I make it so that there is only two options of "russell" and "david". Thanks a lot :confused:
 
Is your combo actually looking at the correct table?

If it is, it sounds like you need to use GroupBy in the query sitting behind the combo box.
 
Yes it is looking at the right table but it pulls up every occurence of the name in my past records instead of the two. Any suggestions ?, this is driving me mad.
 
In the properties of your combo box, in RowSource, click on the ellipsis (...) on the right hand side. If it says, "You invoked a Query Builder on a table etc etc" say Yes.

Click the funny E shaped sign on the toolbar - (or go to View > Totals). This will place GroupBy in the query grid. This should then only show your two entries.
 
Or try typing the following into the Row Source on the Properties sheet for the combo

"Russell";"David"

Then change Row Source Type to 'Value List'
HTH
 
Another option if your pulling the combo box list from the table is type the following in the row source:

SELECT DISTINCT Field1

Field1 being the field holding the names. This is pull only one instance of each name.
 
I'm sorry. I should revise the SQL statement to read:

SELECT DISTINCT Field1 FROM Table1
 
Try opening the query behind the combo, clicking on the empty space above the grid and then open the query properties.

Here you will see a list of properties, 2 of which are -

Unique Values and,
Unique Records

Click on the Unique Values and the problem of a long duplicate list is gone.

Dave Eyley
 

Users who are viewing this thread

Back
Top Bottom