Please support our MS Access and FileMaker Pro advertiser: Programming Forums
Views: 6147 | Replies: 5
![]() |
•
•
Join Date: Aug 2007
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
Hi folks
This will be my first ask for help here
I'm working on a database at the moment and have exhausted my resources on this one.
I have a report with an underlying muti-table query. The report uses an input box to set the date criteria rather than Parameter boxes to show the relevant records from to these dates.
and then I've used within the query to reference to the dates seleted within the input box All is working well here.
My question is. If I wanted to use just the Month and Year as criteria, so that I would, perhaps, just have a drop down month combo box and a control for the year. Is it possible to extract the records for that month rather than typing in the exact date to that day?. Or maybe something similar to this technique?
All my other attemps have failed. Hope someone can help.
This will be my first ask for help here

I'm working on a database at the moment and have exhausted my resources on this one.
I have a report with an underlying muti-table query. The report uses an input box to set the date criteria rather than Parameter boxes to show the relevant records from to these dates.
and then I've used
Between [Forms]![frmMonthlyDisbursalDialog]![StartDate] And [Forms]![frmMonthlyDisbursalDialog]![EndDate]
My question is. If I wanted to use just the Month and Year as criteria, so that I would, perhaps, just have a drop down month combo box and a control for the year. Is it possible to extract the records for that month rather than typing in the exact date to that day?. Or maybe something similar to this technique?
All my other attemps have failed. Hope someone can help.
Last edited by pablavo : Aug 29th, 2007 at 10:37 am.
Hi,
The easiest way is using the function DateSerial so that it would look like
The easiest way is using the function DateSerial so that it would look like
Between DateSerial([Forms]![frmCriteria]![txtFrmYr],[Forms]![frmCriteria]![comFrmMth],1) And DateSerial([Forms]![frmCriteria]![txtToYr],[Forms]![frmCriteria]![comToMth],1). I have included an example that demonstrates this case, hope it is what you are looking for. It is never about the number of languages you know, you either have the logic of programming or you don't ...
Some of the codes I post are collected from different sites during the past couple of years, so I would like to thank them for their help and for enabling me to help.
Some of the codes I post are collected from different sites during the past couple of years, so I would like to thank them for their help and for enabling me to help.
•
•
Join Date: Aug 2007
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
Kb.Net wrote
That's brilliant Kb.net! thankyou! I just have one more question. If I use use the input box and put Dec 2006 to Jan 2007 will that just give me the month of December without pulling records from January?
Thanks again.
The easiest way is using the function DateSerial so that it would look likeThat's brilliant Kb.net! thankyou! I just have one more question. If I use use the input box and put Dec 2006 to Jan 2007 will that just give me the month of December without pulling records from January?
Thanks again.
•
•
Join Date: Aug 2007
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
Ah, Ok it gives me the first day of the "To Month" and then I place a minus 1 " -1)" like so, and that takes away the first day of the "To Month.
Great!
Between DateSerial([Forms]![frmCriteria]![txtFrmYr],[Forms]![frmCriteria]![comFrmMth],1) And DateSerial([Forms]![frmCriteria]![txtToYr],[Forms]![frmCriteria]![comToMth],1-1)
Great!
•
•
•
•
Hello. I'm working on a similar project. Is it possible to have the results returned in another form, Rather than a report? I want to do a Date range search and then be able to edit the data in my resulting records. Thanks
Yes, you would do similar to what was shown for the report but base the criteria of the recordsource of the other form as shown above.
Bob Larson
____________________________________
Access MVP
For Quick Tutorials and Samples for Microsoft Access: BTAB Development
____________________________________
Access MVP
For Quick Tutorials and Samples for Microsoft Access: BTAB Development
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode