By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,389 Members | 2,070 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,389 IT Pros & Developers. It's quick & easy.

Help Me Clean Up My Combo

100+
P: 135
I have a table called "Sampler". Each Sampler in the table has it's own record with vitals. Some of these Samplers have the same email address listed for them. This is because some of the results for the samples they bring in get sent to the same company. I have a combo box on my form for selecting the desired email address. The problem is, because some of the Samplers each have the same email address listed for them, the address is shown multiple times in the combo box. There are also blanks because some of the samplers do not require an email. This looks very messy and is annoying. How do I get my combo box to only display addresses once and without blanks? Any advice on a query or some code that would accomplish this would be much appreciated.
Dec 12 '08 #1
Share this Question
Share on Google+
3 Replies


DonRayner
Expert 100+
P: 489
Base your combobox on a query rather than the table itself. In the query builder you can select the totals button (looks like an M on its side) then in the total for email address field select FIRST, in the criteria for email address you put IS NOT NULL or > ""
Dec 12 '08 #2

100+
P: 135
@DonRayner
Just a little lost. What is the "query builder"? Do you me query design view? In design view their isn't any selection for a totals button. Point me in the right direction...
Dec 13 '08 #3

DonRayner
Expert 100+
P: 489
@MyWaterloo
Yes I do mean "Query design view".

Make sure that your query design toolabar is showing by clicking on View, then
Toolbars... Query Design should have a check beside it.

On the query design toolbar there should be a button that looks like an M on it's side (this is the totals button).

Click on it and you will see a new row in your query design grid labled Total: Should look like this.
Field:
Table:
Total:
Sort:
Show:
Criteria:
or:

Follow the Total row over to the field with the email address and it should say "Group By". Click on the "Group By" for your email address field.

Select First in the drop down list that appears.
Dec 15 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.