Date Criteria Question

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

Guest

I have a set of data which shows the answers to questions asked for a
particular month and year. I have a query which will pull results for a
chosen month and year, which is entered through a form. The fields that I
have in the query are "Question", "Month", "Year", "Date Entered", "Answer".
I want the query to automatically filter out all records for that month that
occured before the 25th based off the "Date Entered" field, however I don't
want to have to input a timerange.
 
Myra

Are you saying that you want the query to use the indicated Month and Year,
and want it to limit the rows return to those where the Day([Date Entered])
< 25?

(use the "< 25" as a criterion, and the Day([Date Entered]) as the "field")

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Hi Myra,

You need to use the DateSerial function.

It has the follownig syntax DateSerial(year, month, day).

So it will look something like DateSerial(txtYear, txtMonth, 25)

Good luck

Nick McMillen
 

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

Back
Top