Access VBA code combo box - TechRepublic
Question
July 29, 2010 at 05:37 PM
lordmaster10

Access VBA code combo box

by lordmaster10 . Updated 15 years, 11 months ago

Hi. I have the next code on my form:
“Private Sub Year_AfterUpdate()
Dim year_filter As Double

year_filter = “SELECT [Books].[Book ID], [Books].[Title], [Books].[Year ID], [Books].[School ID]” & _
“FROM Books ” & _
“WHERE [Year ID] = ” & Me.year.Value
Me.Orders_subform.Form.Books.RowSource = year_filter
Me.Orders_subform.Form.Books.Requery
End Sub”

This works when I have only 1 value on the field “Year”, but I would like to turn this cell into “Multiple Values”. What changes do I need to do so it still filters the values on the combo box.
Any help?

This discussion is locked

All Comments