Hi, I'm hoping someone can help me, I have a form with 3 subforms, I'm using some combo boxes on the main form to filter the 3 subforms. The vba code I'm using works for 2 of the 3 subforms, and I can't figure out why it isn't working for the 3rd one.
I'm getting a Compile error: Variable Not Defined on the last line of code.
I've checked the forms, and I can't find anything glaringly different between them. So I'm very perplexed as to why it's not working. :/
Code:
Forms!frmsearch.subCaretakerSearch1.Form.Filter = "StairID = " & Me.cboStairs & _
" and commentdate between #" & Me.cboStartDate & "# and #" & Me.cboEndDate & "# "
subCaretakerSearch1.Form.FilterOn = True
Forms!frmsearch.subletters.Form.Filter = "StairID = " & Me.cboStairs & _
" and letterdate between #" & Me.cboStartDate & "# and #" & Me.cboEndDate & "# "
subletters.Form.FilterOn = True
Forms!frmsearch.tblRepairssubform.Form.Filter = "StairID = " & Me.cboStairs
' " and inspectiondate between #" & Me.cboStartDate & "# and #" & Me.cboEndDate & "# "
tblRepairssubform.Form.FilterOn = True
I'm getting a Compile error: Variable Not Defined on the last line of code.
Code:
tblRepairssubform.Form.FilterOn = True
I've checked the forms, and I can't find anything glaringly different between them. So I'm very perplexed as to why it's not working. :/