|
-
Mar 23rd, 2000, 09:59 PM
#1
Thread Starter
Member
Why is this statement rejected?
Code:
sSQL = "SELECT * FROM EquipRunTime WHERE pond = '" & rsPonds!pond & "' " & _
"(thedate BETWEEN #" & Format(DateAdd("h", -24, dtCurrent), "General Date") & "# AND #" & _
Format(dtCurrent, "General Date") & "#)AND NOT Cleared ORDER BY thedate DESC"
-
Mar 24th, 2000, 01:25 AM
#2
Frenzied Member
Give this a shot (you're definitely missng an and between the first condition and the second. I also tend to avoid exclamation points when accessing objects. It's not invalid, yet, but it is being phased out) :
sSQL = "SELECT * FROM EquipRunTime WHERE pond = '" & rsPonds.pond & "' and " & _
"(thedate BETWEEN #" & Format(DateAdd("h", -24, dtCurrent), "General Date") & "# AND #" & _
Format(dtCurrent, "General Date") & "#)AND NOT Cleared ORDER BY thedate DESC"
-
Mar 24th, 2000, 02:05 AM
#3
Thread Starter
Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|