P
Peter Hibbs
I have a table (tblMotor) which holds the Motor Insurance Policies for
my client's company. The table has (amongst others) two fields, ID
(AutoNumber) and StartDate (Date/Time). The StartDate field holds the
date the policy was started which means that the renewal date for each
policy will be the same date in each subsequent year.
I also have a form (frmReports) which has two unbound fields -
txtStartDate and txtEndDate. My client wants to show on a report the
total number of policies that were started in a given period (usually
a 3 month period but could vary) where the start and end dates are
specified in the two Text fields.
This I have done with this query :-
SELECT Count(tblMotor.ID) AS CountOfID
FROM tblMotor
WHERE (((tblMotor.StartDate) Between
[Forms]![frmReports]![txtStartDate] And
[Forms]![frmReports]![txtEndDate]));
He also wants to show the total number of policies that are due for
renewal in the same period, that is where the day/month of the
policies fall within the specified period. For example, if the period
is set to 1 Nov 2008 to 16 Jan 2009 he wants a total count of the
number of records where the StartDate falls between those dates
regardless of the actual year. I can't see any easy way to do that,
anyone got any ideas.
Peter Hibbs.
my client's company. The table has (amongst others) two fields, ID
(AutoNumber) and StartDate (Date/Time). The StartDate field holds the
date the policy was started which means that the renewal date for each
policy will be the same date in each subsequent year.
I also have a form (frmReports) which has two unbound fields -
txtStartDate and txtEndDate. My client wants to show on a report the
total number of policies that were started in a given period (usually
a 3 month period but could vary) where the start and end dates are
specified in the two Text fields.
This I have done with this query :-
SELECT Count(tblMotor.ID) AS CountOfID
FROM tblMotor
WHERE (((tblMotor.StartDate) Between
[Forms]![frmReports]![txtStartDate] And
[Forms]![frmReports]![txtEndDate]));
He also wants to show the total number of policies that are due for
renewal in the same period, that is where the day/month of the
policies fall within the specified period. For example, if the period
is set to 1 Nov 2008 to 16 Jan 2009 he wants a total count of the
number of records where the StartDate falls between those dates
regardless of the actual year. I can't see any easy way to do that,
anyone got any ideas.
Peter Hibbs.