Problem w/ Parameter in the Query's criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a query on a table with the criteria on a date field set up as:

[Forms]![EntryForm]![StartDate]-7

In other words, I want the criteria to be seven days previous to whatever
the start date is in the entry form. I'm getting a "This expression is typed
incorrectly or . . " error message. The query seems to freak out when I add
the "-7". If I take off the "-7" it runs fine. What am I doing wrong?
 
Hi,


Try

CDate([Forms]![EntryForm]![StartDate]) -7



Hoping it may help,
Vanderghast, Access MVP
 
Works! Thanks, Mike

Michel Walsh said:
Hi,


Try

CDate([Forms]![EntryForm]![StartDate]) -7



Hoping it may help,
Vanderghast, Access MVP

Stu said:
I have a query on a table with the criteria on a date field set up as:

[Forms]![EntryForm]![StartDate]-7

In other words, I want the criteria to be seven days previous to whatever
the start date is in the entry form. I'm getting a "This expression is
typed
incorrectly or . . " error message. The query seems to freak out when I
add
the "-7". If I take off the "-7" it runs fine. What am I doing wrong?
 
Back
Top