Solved

DISTINCT not working in combobox

Posted on 2009-05-13
2
341 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 150 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

635 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