villsthearcher
Technical User
Hi,
I am passing date as a Parameter to the query. I am using a date range by using the function BETWEEN.
Note: I have used actual values in the Square brackets just for understanding purposes.
The problem I was having with the query was that, if I run a query with the parameter value: BETWEEN [1995] and [1997], it pulls out all records in the years 1995 and 1996, but not 1997. So what I did was I used: BETWEEN [1995] and [1997] + 1. This worked perfectly fine, when I was directly working on the Query.
When I used a Form to pass the date range parameters to the same Query, it still pulls out records between 1995 and 1996, but not 1997. I wondering why this happens although the underlying Query works perfectly fine!
Thanks,
villsthearcher
I am passing date as a Parameter to the query. I am using a date range by using the function BETWEEN.
Note: I have used actual values in the Square brackets just for understanding purposes.
The problem I was having with the query was that, if I run a query with the parameter value: BETWEEN [1995] and [1997], it pulls out all records in the years 1995 and 1996, but not 1997. So what I did was I used: BETWEEN [1995] and [1997] + 1. This worked perfectly fine, when I was directly working on the Query.
When I used a Form to pass the date range parameters to the same Query, it still pulls out records between 1995 and 1996, but not 1997. I wondering why this happens although the underlying Query works perfectly fine!
Thanks,
villsthearcher