Hello all,
I keeping a the error (Access can't find the 'FrmSearch' referred to in your expression in a form) Can anyone point me in the right direction. Here is my code:
Private Sub Search_Click()
Const cInvalidDateError As String = "You have entered an invalid date."
Dim strWhere As String
Dim strError As String
strWhere = "1=1"
If Not IsNull(Me.txtTellerNum) Then
'Create Predicate
strWhere = strWhere & " AND " & "QryFind.[Person] = " & Me.txtTellerNum & ""
End If
If Nz(Me.StatusSRH) <> "" Then
strWhere = strWhere & " AND " & "QryFind.[Type] = '" & Me.StatusSRH & "'"
End If
If strError <> "" Then
MsgBox strError
Else
acWindowNormal
If Not Me.FormFooter.Visible Then
Me.FormFooter.Visible = True
End If
Me!FrmLookup.Form.Filter = strWhere
Me!FrmLookup.Form.FilterOn = True
End If
End Sub
I keeping a the error (Access can't find the 'FrmSearch' referred to in your expression in a form) Can anyone point me in the right direction. Here is my code:
Private Sub Search_Click()
Const cInvalidDateError As String = "You have entered an invalid date."
Dim strWhere As String
Dim strError As String
strWhere = "1=1"
If Not IsNull(Me.txtTellerNum) Then
'Create Predicate
strWhere = strWhere & " AND " & "QryFind.[Person] = " & Me.txtTellerNum & ""
End If
If Nz(Me.StatusSRH) <> "" Then
strWhere = strWhere & " AND " & "QryFind.[Type] = '" & Me.StatusSRH & "'"
End If
If strError <> "" Then
MsgBox strError
Else
acWindowNormal
If Not Me.FormFooter.Visible Then
Me.FormFooter.Visible = True
End If
Me!FrmLookup.Form.Filter = strWhere
Me!FrmLookup.Form.FilterOn = True
End If
End Sub