Populate Access ListBox with Distinct/Unique Values?

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 attached image)

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.


This is what i currently have in the property sheet for the ListBox under the Row Source

SELECT DISTINCT tblProperty.PropertyID, tblProperty.PropertyType FROM tblProperty ORDER BY tblProperty.[PropertyType];

The PropertyID property is hidden form what i recall.

Attachment image

1 Answer

  • Anonymous
    8 months ago
    Favorite Answer

    Control Source: (blank)

    Row Source Type: Value List

    Row Source: "Castle";"Villa";"Manor"

Still have questions? Get your answers by asking now.