Date Query

naomi

Registered User.
Local time
Today, 08:33
Joined
Apr 21, 2003
Messages
19
please tell me what is wrong with this syntax:

My form is using a checkbox. The checkbox inquires wheter I want to use this date or not? But when I pull it up, it doesnt' work, please tell me what is wrong with my query?

IIf([Forms]![Search]![UseDate].[Value]=True,([Compliance2].[Date]) Between [Forms]![Search]![DateFrom] And [Forms]![Search]![DateTo],[Compliance2]![Date])
 
IIf([Forms]![Search]![UseDate].[Value]=True,
([Compliance2].[Date]) Between [Forms]![Search]![DateFrom] And [Forms]![Search]![DateTo],
[Compliance2]![Date])

This doesnt seem to be logical, i presume Compliance2 is a table and [date] is a field there? Then how come your comparing it to itself?

If not clarify a bit more please..... If its in an SQL post the whole SQL...

Also ! please in future dont use Date as a field name for anything, sooner or later its gonna bite you in the *ss. Date() beeing the problem if you use plane date Access will enterprate it as Date().

Just a caution mind you...
 

Users who are viewing this thread

Back
Top Bottom