Hi all. I am using faq702-777 as a guide. My form has 2 combo boxes and 2 subforms. There is a button that opens another form that will have several checkboxes that will allow the user to select 1 filtering critera. There is one unbound textbox for them to enter the critera. The following the code so far that doesn't filter.
Dim strFilter As String
strFilter = ""
If ChkAcctNum = -1 Then
strFilter = Me![txtSearch].Value
End If
If Len(strFilter) Then
[Forms]![frmBilShet].Filter = "txtAcctNum = '" & strFilter & "'"
[Forms]![frmBilShet].FilterOn = True
End If
Stepping thru, on the FilterOn line a messagebox popups asking for parameter in txtAcctNum. Even if I enter the value again it does not apply the correct filter. I can filter the form by right clicking on the textbox. When as I going wrong? Thanks in advance.
Dim strFilter As String
strFilter = ""
If ChkAcctNum = -1 Then
strFilter = Me![txtSearch].Value
End If
If Len(strFilter) Then
[Forms]![frmBilShet].Filter = "txtAcctNum = '" & strFilter & "'"
[Forms]![frmBilShet].FilterOn = True
End If
Stepping thru, on the FilterOn line a messagebox popups asking for parameter in txtAcctNum. Even if I enter the value again it does not apply the correct filter. I can filter the form by right clicking on the textbox. When as I going wrong? Thanks in advance.