Populate Access ListBox with Distinct/Unique Values

globz

New Member
Joined
Dec 8, 2019
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I'm a CS student in my 4th year, my professor wont grade my assignment because i didn't populate a ListBox correctly (I got a 10/200 but i have an option to turn in 1 revision). The ListBox named "lstCateName" displays a property type (castle, villa, manor) from a table named "tblProperty" on a form called "frmType".

My problem is with getting the ListBox to display only one of each Property type (Only 3 options instead of many same repeating options like in the image below)

1.png


I need it to only display 3 options, "castle", "villa", and "manor". I have looked endlessly for the solution to no avail. There are some tutorials out there that focus on Excel and use VBA which i am not familiar with nor do i know how to implement into an Access Database.
 
Last edited by a moderator:

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hi, in Access is easier than Excel, you only use RowSourceType property to Table/Query and its RowSource property put the query with Select Distinct Type From tblProperty

Please see this post:
 
Upvote 0

Forum statistics

Threads
1,215,430
Messages
6,124,847
Members
449,194
Latest member
HellScout

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