remove duplicates query (1 Viewer)

cos

Registered User.
Local time
Today, 12:40
Joined
Jul 13, 2012
Messages
81
Im sure that this is an over asked question, but, how may i remove duplicates from my query? I have a visits table, with managers doing these visits; and i have a field called "Manager". The problem now is that when i put this in a form, and create a search combo box, the combo shows me the same managers being repeated..

the idea i had was to create a query where it will be just a list of all managers entered without duplicates!

I did attempt to search the web, and got crazy confused.. i saw a youtube clip where some guy uses the "count" sum function, but when i tried this, the clank fields were all zero's and where the manager name repeated, the count was "1"..

any ideas on how i can create this query from start? :confused:
much appreciated guys!!
 

John Big Booty

AWF VIP
Local time
Today, 21:40
Joined
Aug 29, 2005
Messages
8,262
Use the query wizard to create a Find Duplicates query. Once you are happy that this query is selecting the data you wish to delete, convert the query to a delete query.
 

cos

Registered User.
Local time
Today, 12:40
Joined
Jul 13, 2012
Messages
81
but i don't want to delete any of the records.. all i need is that visually, in the combo box, the user can select wanted manager without having to go through the endless duplicates. and i have considered having a separate table for managers, but that will confuse the hell out of the system, and my self included.
 

vbaInet

AWF VIP
Local time
Today, 12:40
Joined
Jan 22, 2010
Messages
26,374
* What is the Row Source of your combo box?
* What is the Default View of your form?
 

dylan_dog

Registered User.
Local time
Today, 13:40
Joined
Jan 2, 2012
Messages
40
You could create a query with the following SQL syntax:

Code:
SELECT DISTINCT [COLOR=Red]your_table.your_field[/COLOR]
FROM [COLOR=Red]your_table[/COLOR]
WITH OWNERACCESS OPTION;

and have the source for your combo box from that query.
 

vbaInet

AWF VIP
Local time
Today, 12:40
Joined
Jan 22, 2010
Messages
26,374
Fyi: "WITH OWNERACCESS OPTION" is only relevant in a multi-user db that implements Group Security.
 

dylan_dog

Registered User.
Local time
Today, 13:40
Joined
Jan 2, 2012
Messages
40
Thanks, I never went into it when I looked at SQL produced by Access.It's just always there and I copied all :).
 

Users who are viewing this thread

Top Bottom