If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
What is wrong with this WHERE clause ?
WHERE CloseDate is not Null AND
CloseDate Between "#" & Format$(varStart(), 'mm/dd/yyyy hh:nn:ss AM/PM') & "# And #" & Format$(varEnd(), 'mm/dd/yyyy hh:nn:ss AM/PM') & "#" |
#2
|
|||
|
|||
What is wrong with this WHERE clause ?
Assuming that varStart and varEnd are public functions that exist in your
database, this statement looks ok. So, can you tell us what error you're getting? Kinda hard to help if we don't know why you (or ACCESS) think it's wrong. -- Ken Snell MS ACCESS MVP "David" wrote in message ... WHERE CloseDate is not Null AND CloseDate Between "#" & Format$(varStart(), 'mm/dd/yyyy hh:nn:ss AM/PM') & "# And #" & Format$(varEnd(), 'mm/dd/yyyy hh:nn:ss AM/PM') & "#" |
#3
|
|||
|
|||
What is wrong with this WHERE clause ?
The first condition (CloseDate is not Null) is NOT necessary. If CloseDate
is Null, the 2nd condition will return Null which will be treated as not True and therefore not selected. That is not "wrong", though. If the varStart() and varEnd() are Public functions that return Null or Date values, the WHERE clause looks OK (provided that the Query is executed in Access). You will have to tell us the symptoms of "what's wrong". -- HTH Van T. Dinh MVP (Access) "David" wrote in message ... WHERE CloseDate is not Null AND CloseDate Between "#" & Format$(varStart(), 'mm/dd/yyyy hh:nn:ss AM/PM') & "# And #" & Format$(varEnd(), 'mm/dd/yyyy hh:nn:ss AM/PM') & "#" |
Thread Tools | |
Display Modes | |
|
|