Nifty Between Dates - XPendingX
Most projects contain a form for setting a range of dates for a report, and basically that’s what this Form does, however it takes this stage further and produces the “Between Statement”, the “Between Clause” for your SQL Statement.
The other novel feature is that it returns this “Between Clause” to the Tag Property of the Form that opened it, commonly referred to as the “Calling Form”.
With this form you can select date “SPANS” — by day Span, week Span, month Span, year Span or custom. When you press the OK button it returns the “Between Clause” of an SQL Statement. You can then add this between clause to your own SQL Statements and limit the return of records for reports, queries, whatever really.
I found an example for selecting common “date spans” on the Internet. I realised the code would lend itself to form the construction of SQL Statements.
When constructing SQL I was always running into problems, particularly with dates. Being UK centered, UK dates always cause problems within MS Access. I could immediately see two benefits of this Form. However, there was a problem, it needed more options, selections. I set about trying to span an option group across a couple of tab pages. This was unsuccessful. I eventually found a way of simulating this, and once I got it working for two Tab pages it was easy to expand it over any number of TAB pages.
Nifty Between Dates
… …