Forum Discussion
slan110
Aug 25, 2023Copper Contributor
Help with Query Criteria
Hello!
I have a query where users are entering two dates [Enter Start Transaction Date] and [Enter End Transaction Date]. I am trying to create a subquery that will use [Enter Start Transaction Date] and look back 5 days to capture anything in that timeframe.
I'm trying this (unsuccessfully): Between [Enter Start Transaction Date]-5 And [Enter Start Transaction Date]
Have also tried this: Between ([Enter Start Transaction Date]-5) And [Enter Start Transaction Date]
This is the error I get:
Is this even possible? And if so, how can I achieve this? Thank you!
- I actually able to use a formula like : Between DateAdd("d",-5,[Enter Date]) And [Enter Date] and it worked perfectly!
2 Replies
- slan110Copper ContributorI actually able to use a formula like : Between DateAdd("d",-5,[Enter Date]) And [Enter Date] and it worked perfectly!
- Tom_van_StiphoutIron ContributorSee if it improves if
[Enter Start Transaction Date]
is a Parameter of type DateTime in your query. While in query design view, find the Parameters form on the Ribbon.