listbox
2 TopicsPopulate 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 image below) 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. [edit] 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.4.3KViews0likes1CommentUserform Listbox HELP
Greetings Everyone, I need some HELP! Please bear with me if I ask too many questions, as I am fairly new to VBA. Anyways, I created a userform in Word 2016 to auto-populate a template but I would like to create a drop-down where a user could select text from the drop-down and insert the selected text in the Word template. How would I go about doing so? I was able to create a listbox in the userform with the following code below, however how do I get the item selected to populate in the word template??? Private Sub UserFrom_Initialize() With ListBox1 .AddItem "VIA US MAIL ONLY" .AddItem "VIA Electronic Mail Only" End With lbl_Exit: Exit Sub End Sub Thank you in advance for anyone's assistance!!Solved1KViews0likes1Comment