Kathy Webster wrote:
> Our reporting period is from the 25th of the month to the 25th of the
> next month.
>
> I have a [MonthReporting] field and a [YearReporting] control on a
> form where the user selects the month and year they wish to report
> on. So if they select, for example, October in the [MonthReporting]
> field, and 2006 in the [YearReporting] field, I have to show them all
> records where the [PaymentDate] is between September 25, 2006 and
> October 25, 2006.
> Can anyone help?
> TIA,
> Kathy
SELECT *
FROM TabelName
WHERE DateField >= DateSerial(YearReporting, MonthReporting-1, 25)
AND DateField < DateSerial(YearReporting, MonthReporting, 26)
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
|