Process a date range for filtering report queries and for displaying on reports. DateFrom and DateTo must be a valid date or empty.
If specified, DateFrom must be less than DateTo.
If DateFrom is empty, the date #1/1/1980# is used as the start of the range. If DateTo is empty, the date #1/1/2200# is used as the end of the range. The date range text is generated:
- if DateFrom and DateTo are empty, 'All Records'
- if DateFrom is empty, 'to 1 Jan 2003'
- if DateTo is empty, '1 Jan 2003 onwards' The range data is stored as global values: StartDate - start (as date) EndDate - end (as date) FromDateDisp - start (as formatted string) ToDateDisp - end (as formatted string) DateDisp - date range description as above eg. use GlobalVal("DateDisp") or GlobalValNoErr("DateDisp") to retrieve the values
The variant containing the From date
The variant containing the To date