I have a form with a list box control called ppe_req. The user selects one or more items from the list and then clicks a button that opens a word template and populates the document with information from the form. Everything works except the data coming from the list boxes. Access ignores the selected items and returns an empty string when the loop is executed below. If I use the immediate window and type in ?me.ppe_req.itemsselected.
count, I get 0 even though there are 5 items selected in the list. What am I missing?
i = 0
Do Until IsNull(Me.ppe_req.ItemData(i))
If Me.ppe_req.Selected(i) Then
strPpe_req = strPpe_req & Me.ppe_req.ItemData(i) & vbCrLf
i = i + 1