Filter a query in a date range

A

Andreas Y.

I have a query in Access2007 which contains reansactions of several years. I
work in design mode and I want my query to return only transactions of a
custom defined date range that will be defined by the user at execution
time. I tried to use criteria (>StartDate <EndDate) which where defined in
other columns but it doesn't work. How should I do this?
 
J

Jerry Whittle

Should look like:

Between [Start Date] and [End Date]

That will prompt the user to type in both the Start and End dates. I don't
have A07 here with me, so I don't know the exact steps, but it's a very, very
good idea to define the [Start Date] and [End Date] parameters as Dates.
 
A

Andreas Y.

Thanks but where and how should I define them as dates?


Jerry Whittle said:
Should look like:

Between [Start Date] and [End Date]

That will prompt the user to type in both the Start and End dates. I don't
have A07 here with me, so I don't know the exact steps, but it's a very,
very
good idea to define the [Start Date] and [End Date] parameters as Dates.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

Andreas Y. said:
I have a query in Access2007 which contains reansactions of several
years. I
work in design mode and I want my query to return only transactions of a
custom defined date range that will be defined by the user at execution
time. I tried to use criteria (>StartDate <EndDate) which where defined
in
other columns but it doesn't work. How should I do this?
 
J

Jerry Whittle

That's what I meant by not having A07 handy. I could tell you in my sleep if
it was a previous version of Access, but A07 has me dazed and confused. I'll
try to remember to look it up once I get home where I have A07.

You could try searching on Parameter in Help, but hard telling if what you
need will be in the first 20 returns!
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


Andreas Y. said:
Thanks but where and how should I define them as dates?


Jerry Whittle said:
Should look like:

Between [Start Date] and [End Date]

That will prompt the user to type in both the Start and End dates. I don't
have A07 here with me, so I don't know the exact steps, but it's a very,
very
good idea to define the [Start Date] and [End Date] parameters as Dates.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

Andreas Y. said:
I have a query in Access2007 which contains reansactions of several
years. I
work in design mode and I want my query to return only transactions of a
custom defined date range that will be defined by the user at execution
time. I tried to use criteria (>StartDate <EndDate) which where defined
in
other columns but it doesn't work. How should I do this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top