Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

DISTINCT not working in combobox

Posted on 2009-05-13
2
Medium Priority
?
345 Views
Last Modified: 2012-06-22
I use the below query as the row source for a combobox in a form. If I just run the query no duplicates are shown, however in the combobox the duplicates are shown.

Why is this happening?
SELECT DISTINCT BankAccountNumber FROM itblBankAccounts WHERE BusinessUnit IN (SELECT BusinessUnit FROM qryBusinessUnits) ORDER BY BankAccountNumber;

Open in new window

form.bmp
query.bmp
0
Comment
Question by:bejhan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 600 total points
ID: 24378260
are you loading the data 2 times, presumably...
0
 
LVL 1

Author Comment

by:bejhan
ID: 24378336
Oh jesus I feel like an idiot. I forgot I set the recordsource when the form loads... not really sure why I'm doing that but thats why. I forgot to change to DISTINCT in there.

Easy points eh?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question