I am having an issue with the following statement. I am getting the error missing operator in expression. The is on the rs.FindFirst findfirstvar statement. Any thoughts on what I am missing would be appreciated. I have been on this for a day or two and banging my head against the wall.
Set rs = CurrentDb.OpenRecordset("Tbl_CheckedOut", dbOpenSnapshot)
findfirstvar = "Tbl_CheckedOut.MeetingDate = #" & Forms!Frm_CheckedOut![TxtMeetingDate] & "# And (Tbl_CheckedOut.MeetingStartTime between #" & Forms!Frm_CheckedOut![TxtMeetingStartTime] & "# And " & _
Forms!Frm_CheckedOut![TxtMeetingEndTime] & "#)"
rs.FindFirst findfirstvar
When I use the immediate window, the variable findfirstvar = MeetingDate = #3/16/2017# And (MeetingStartTime between #2:00:00 PM# And 3:00:00 PM#)
Set rs = CurrentDb.OpenRecordset("Tbl_CheckedOut", dbOpenSnapshot)
findfirstvar = "Tbl_CheckedOut.MeetingDate = #" & Forms!Frm_CheckedOut![TxtMeetingDate] & "# And (Tbl_CheckedOut.MeetingStartTime between #" & Forms!Frm_CheckedOut![TxtMeetingStartTime] & "# And " & _
Forms!Frm_CheckedOut![TxtMeetingEndTime] & "#)"
rs.FindFirst findfirstvar
When I use the immediate window, the variable findfirstvar = MeetingDate = #3/16/2017# And (MeetingStartTime between #2:00:00 PM# And 3:00:00 PM#)