D
DS
How can I combine these to DCounts into one? Is there an or that I can add?
Me.TxtCount = DCount("[MenuID]", "MenuDetails", _
"MenuDetails.TerminalID = " & Forms!Patrons!TxtPatTermID & _
" AND MenuDetails.StartDay = Forms!Patrons!TxtDay " & _
" AND MenuDetails.StartTime <= #" & Time() & "#" & _
" AND MenuDetails.EndTime >= #" & Time() & "#" & _
" AND MenuDetails.Active = -1 " & "")
Me.TxtCount = DCount("[MenuID]", "MenuDetails", _
"MenuDetails.TerminalID = " & Forms!Patrons!TxtPatTermID & _
" AND MenuDetails.StartDay = Forms!Patrons!TxtDay-1 " & _
" AND MenuDetails.StartTime >= #" & Time() & "#" & _
" AND MenuDetails.EndTime >= #" & Time() & "#" & _
" AND MenuDetails.Active = -1 " & _
" AND MenuDetails.AfterMidnite = -1 " & "")
The only difference is the StartTime and the addition of the last line
on the second one. Any help appreciated.
Thanks
DS
Me.TxtCount = DCount("[MenuID]", "MenuDetails", _
"MenuDetails.TerminalID = " & Forms!Patrons!TxtPatTermID & _
" AND MenuDetails.StartDay = Forms!Patrons!TxtDay " & _
" AND MenuDetails.StartTime <= #" & Time() & "#" & _
" AND MenuDetails.EndTime >= #" & Time() & "#" & _
" AND MenuDetails.Active = -1 " & "")
Me.TxtCount = DCount("[MenuID]", "MenuDetails", _
"MenuDetails.TerminalID = " & Forms!Patrons!TxtPatTermID & _
" AND MenuDetails.StartDay = Forms!Patrons!TxtDay-1 " & _
" AND MenuDetails.StartTime >= #" & Time() & "#" & _
" AND MenuDetails.EndTime >= #" & Time() & "#" & _
" AND MenuDetails.Active = -1 " & _
" AND MenuDetails.AfterMidnite = -1 " & "")
The only difference is the StartTime and the addition of the last line
on the second one. Any help appreciated.
Thanks
DS