Tech Support Forum banner

Access 2003 Combo Box

949 Views 1 Reply 2 Participants Last post by  JimBoCol
I'm trying to create a combo box for users to select data for a query however the field that I'm using has multiple records which use the same data. When I create the combo the drop down shows the data repeated for each record. For example, I want to be able to look up all records for the same surname but when I look up Smith the combo box shows this name repeated several times. How can I set this so that it only shows a list of different names?
Status
Not open for further replies.
1 - 2 of 2 Posts
I'm trying to create a combo box for users to select data for a query however the field that I'm using has multiple records which use the same data. When I create the combo the drop down shows the data repeated for each record. For example, I want to be able to look up all records for the same surname but when I look up Smith the combo box shows this name repeated several times. How can I set this so that it only shows a list of different names?
For this example, let's say that your table name is CUST, and the field you are using would be CustName

in the properties of your combo box, on the Data Tab, under rowsource put the following:
Code:
SELECT [CUST].[CUSTNAME] FROM CUST GROUP BY [CUST].[CUSTNAME] ORDER BY [CUST].[CUSTNAME]
Please see attachment for clarity.

let me know if this helps you.
Jim.

Attachments

See less See more
1 - 2 of 2 Posts
Status
Not open for further replies.
Top