Solved

DISTINCT not working in combobox

Posted on 2009-05-13
2
299 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
2 Comments
 
LVL 142

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
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…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now