I am doing a record set clone with a FindFirst. Here is what I have
rs.FindFirst "[Physician Group Name]=""" & Me!Combo148 & """
and it works but I need to add another condition so now I have:
rs.FindFirst "[Physician Group Name]=" & Me!Combo148 & " And " & _
"[Request Date]=#" & Me!RequestDate & "#"
and it DOES NOT work, but this one does with another criteria below does work:
rs.FindFirst "[TIN]=" & Str(Nz(Me![Combo148], 0)) & " AND " & _
"[Request Date] = #" & Me![RequestDate] & "#"
I do not understand why it is not working for the physician group name!!!
I am also doing an If statement:
Dim rs As Object
Set rs = Me.Recordset.Clone
If [Searchbox] = "TIN" Then
rs.FindFirst "[TIN]=" & Str(Nz(Me![Combo148], 0)) & " AND " & _
"[Request Date] = #" & Me![RequestDate] & "#"
ElseIf [Searchbox] = "Physician Group Name" Then
rs.FindFirst "[Physician Group Name]=""" & Me![Combo148] & """"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End If
End Sub
The first part works with the TIN if the ELSEIF is not there and the second parts works but I need them to work together and the second part to have the date criteria as well.