Please Help ! Queries for Dates, if statement...

B

Bill

Hi,

I'm trying to figure it out where I can enter the date myself rather than
using "DATE ()".

1) I create the queries and it's work but this is not what I'm looking for:
GroupName: IIf((DateAdd("yyyy",1,[LastDayPaid]))<Date() And
[StartDate]>[LastDayPaid] And
[SGroupName]='Active','Discontinued',[SGroupName])

2) I try to change to but it doesn't work:
GroupName: IIf((DateAdd("yyyy",1,[LastDayPaid]))<[Enter Date of this Month]
And [StartDate]>[LastDayPaid] And
[SGroupName]='Active','Discontinued',[SGroupName])

Both are the same but the only different is "Date()" and "[Enter Date of
this Month]. Please help me if I did wrong on #2 because it doesn't work
and give more numbers of records.
Thanks
 
J

Jeff Boyce

Bill

Maybe just a matter of semantics...

The Date() function returns a date. What kind of value are you using to
respond to the prompt you've created ([Enter Date Of This Month])?

What happens in your query if you substitute the value in place of the
[Enter Date Of This Month] prompt?

Regards

Jeff Boyce
<Access MVP>
 
D

Duane Hookom

Next time please tell us what you mean by "doesn't work". You can see your
results but we can't. It would really help us if we knew what results you
are getting. I expect that you need to wrap your parameter like
CDate([Enter Date of this Month])
 
Top