Missing Operator in Expression (1 Viewer)

jkrug

New member
Local time
Yesterday, 21:46
Joined
Feb 13, 2017
Messages
4
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#)
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 21:46
Joined
Aug 30, 2003
Messages
36,131
For starters, you're missing the # at the beginning of the second time.
 

Users who are viewing this thread

Top Bottom