Combo Box with only unique values

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,341
Office Version
  1. 365
Platform
  1. Windows
I have a combo box on a form. It is based off a query

SELECT [qry_vluVendorAddress].[VendorName], [qry_vluVendorAddress].[VendorID], [qry_vluVendorAddress].[CityName], [qry_vluVendorAddress].[MailState], [qry_vluVendorAddress].[CountryCode] FROM qry_vluVendorAddress ORDER BY [VendorName];

How do I get the Combo Box to not show Duplicates?

Not the query I listed above was created just for the Combo box list (based on two tables). So I can do what ever is needed to get a list that only has unique records

Thanks
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Re: Access: Combo Box with only unique values

One way is to group the records via an Aggregate Query.
You do this by grouping by all the fields in your Select clausei.e.
Code:
[COLOR=#333333]SELECT [qry_vluVendorAddress].[VendorName], [qry_vluVendorAddress].[VendorID], [qry_vluVendorAddress].[CityName], [qry_vluVendorAddress].[MailState], [qry_vluVendorAddress].[CountryCode] 
FROM qry_vluVendorAddress 
[/COLOR][COLOR=#ff0000]GROUP BY [qry_vluVendorAddress].[VendorName], [qry_vluVendorAddress].[VendorID], [qry_vluVendorAddress].[CityName], [qry_vluVendorAddress].[MailState], [qry_vluVendorAddress].[CountryCode] [/COLOR][COLOR=#333333]
ORDER BY [VendorName];[/COLOR]

Another alternative can be found here: https://support.office.com/en-us/ar...edicates-24f2a47d-a803-4c7c-8e81-756fe298ce57
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,899
Messages
6,122,155
Members
449,068
Latest member
shiz11713

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top