I've been looking for an answer to what seems like a simple question and haven't found one that makes sense to me. Here's what I'm trying to do. I have a table that has the twelve months of the year. Jan Feb Mar etc. I use this table in lost of different places where the user select the month that will be used in extracts. Now however I want to the user to be able to select multiple months. On my form I created a List box select the Months table and set the Multi select to simple. The list box shows up with the months and allows the user to select multiple months. I have set the Lost focus event with the following code.
I loop through the list but the months are not what I selected it's list nothing is selected. If I select three months it code loops through three times but with the first three items in the months table.
There is a yes/no column in the months table that I would like to mark as true for those months that the user selects.
Thanks for any help
Code:
Dim ctl As Control, varItm As Variant
Set ctl = Me![LstMonths]
For Each varItm In ctl.ItemsSelected
VMon = ctl.Selected(Months)
Next varItm
There is a yes/no column in the months table that I would like to mark as true for those months that the user selects.
Thanks for any help
Comment