I am having problems with a strWhere code - see below. I am getting an error message on the Me.frmBrowse_All_Programs.Form.Filter = strWhere line of code. What am I doing wrong.
Private Sub Search_Click()
Dim strWhere As String
Dim strError As String
strWhere = "1=1"
' If UCMG Code
If Not IsNull(Me.UCMGCode) Then
strWhere = strWhere & " AND " & "frmBrowse All Programs.[UCMG Code] = " & Me.UCMGCode & ""
End If
' If Program Name
If Not IsNull(Me.ProgramName) Then
strWhere = strWhere & " AND " & "frmBrowse All Programs.[Program Name] = " & Me.ProgramName & ""
End If
If IsNull(strWhere) Then
MsgBox "No Criteria was selected for search."
Else
'DoCmd.OpenForm "Browse Issues", acFormDS, , strWhere, acFormEdit, acWindowNormal
If Not Me.FormFooter.Visible Then
Me.FormFooter.Visible = True
DoCmd.MoveSize Height:=Me.WindowHeight + Me.FormFooter.Height
End If
Me.frmBrowse_All_Programs.Form.Filter = strWhere
Me.frmBrowse_All_Programs.Form.FilterOn = True
End If
End Sub