Select records based on 2 dates

T

Thorson

Someone helped me out with a problem I had in the past to select records for
the month and up until the 5th of the next month. The criteria I have set up
currently selects records between the 5th of the previous month and the 5th
of the next month, I will probably change it to select between the 1st of the
previous month and the 5th of the next month. This is what I currently have:

Between
DateSerial([Forms]![frmCurrentInventoryDateQuery]![cboYear],[Forms]![frmCurrentInventoryDateQuery]![cboMonth],5)
And
DateAdd("m",1,DateSerial([Forms]![frmCurrentInventoryDateQuery]![cboYear],[Forms]![frmCurrentInventoryDateQuery]![cboMonth],5))

However I would like to change it a little and I can't figure out how, I'm
thinking that I made need some sort of IIf statement in the Criteria line,
but I don't know if that is even possible, I am new to this.

I want the criteria to continue to pull the records up until the 5th of the
next month (which is how it is currently setup). However, if the "DispDate"
(which is the date of the actual record) is in the first 5 days of the next
month and was also entered during the first 5 days of the next month (so the
"EntryDate" is in the first 5 days), it will come up on the previous report,
I don't want this.

Is there anyway to get the Criteria to do what it is doing now, but check to
see if the Disposition Date is the same month as the entry date and therefore
pull that record during the actual month it took place instead of the month
before (this is only a problem during the first 5 days of the month).

My other option is to have all users wait to enter records until the 6th of
the month, but this is not very convenient.

Let me know if you need more info...
Thanks!
 

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