L
Larry Salvucci
I want to be able to filter my records on my subform based on 2 combo boxes
on my main form. The first combo is "cboYearSelect" and the second is
"cboMonthSelect. I want to first filter them by Year and then by month. The
two forms are linked by the VendorID. I'm using this code in the after update
event for my cboYearSelect:
Me.Filter = "[Forms]![frmSearchCriteriaSub]![Years] = '" & Me!cboYearSelect
& "'"
Me.FilterOn = True
And then this code for the after update event for my cboMonthSelect:
Me.Filter = "[Forms]![frmSearchCriteriaSub]![Months] = '" &
Me!cboMonthSelect & "'"
Me.FilterOn = True
Why won't it filter my data? Everytime I try it I get a parameter box that
pops up looking for [Forms]![frmSearchCriteriaSub]![Years].
on my main form. The first combo is "cboYearSelect" and the second is
"cboMonthSelect. I want to first filter them by Year and then by month. The
two forms are linked by the VendorID. I'm using this code in the after update
event for my cboYearSelect:
Me.Filter = "[Forms]![frmSearchCriteriaSub]![Years] = '" & Me!cboYearSelect
& "'"
Me.FilterOn = True
And then this code for the after update event for my cboMonthSelect:
Me.Filter = "[Forms]![frmSearchCriteriaSub]![Months] = '" &
Me!cboMonthSelect & "'"
Me.FilterOn = True
Why won't it filter my data? Everytime I try it I get a parameter box that
pops up looking for [Forms]![frmSearchCriteriaSub]![Years].