Solved

DISTINCT not working in combobox

Posted on 2009-05-13
2
325 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 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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
ADODB problem 20 38
SQL Select in Access 2003 3 27
Run Stored Procedure uisng ADO 5 22
Email Populated Report as PDF 2 14
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

828 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