N
Ni4Ni| Olivas
Greetings,
I need some help with my code. The report in question has a prompt
that lets you enter in a date range. When it generates the report the
heading reflects the date range inputed, which is fine.
--
However, there is a column in the data portion named "Last Contacted"
which is where I'm getting stuck. What I need this column to do is to
always be "Less Than" the report date range, if there was a date of
contact that existed prior to it.
An example would be that if my date range is from July 1st, 2007 to
July 31st, 2007, then the "Last Contacted" column should return records
prior to that date range. Below is my code. The section in Bold and
Italics is where I'm stuck.
-SELECT qry4ABCBank.Account, qry4ABCBank.ANum_fk, qry4ABCBank.Name,
qry4ABCBank.Date, qry4ABCBank.TotalDeposits, qry4ABCBank.Description,
qry4ABCBank.ÚltimoDeAddComments, qry4ABCBank.ÚltimoDeIncludeInReport,
qry4ABCBank.PositiveAlert, Last(qryAllMonths.CuentaDeANum_pk) AS
ÚltimoDeCuentaDeANum_pk, Last(tblFollowup.CallDate) AS
ÚltimoDeCallDate, Last(tblActions.NextStep) AS ÚltimoDeNextStep
FROM ((qryAllMonths RIGHT JOIN qry4ABCBank ON
qryAllMonths.ANum_pk=qry4ABCBank.ANum_fk) LEFT JOIN tblFollowup ON
qry4ABCBank.ANum_fk=tblFollowup.ANum_fk)LEFT JOIN tblActions ON
qry4ABCBank.ANum_fk=tblActions.ANum_fk
-WHERE ((TBLFOLLOWUP.CALLDATE) <
(FORMS!REPORTDATERANGE!BEGINNINGDATE))-
GROUP BY qry4ABCBank.Account, qry4ABCBank.ANum_fk, qry4ABCBank.Name,
qry4ABCBank.Date, qry4ABCBank.TotalDeposits, qry4ABCBank.Description,
qry4ABCBank.ÚltimoDeAddComments, qry4ABCBank.ÚltimoDeIncludeInReport,
qry4ABCBank.PositiveAlert
HAVING (((qry4ABCBank.Date) Between forms!ReportDateRange!beginningDate
And forms!ReportDateRange!EndingDate));
-
I need some help with my code. The report in question has a prompt
that lets you enter in a date range. When it generates the report the
heading reflects the date range inputed, which is fine.
--
However, there is a column in the data portion named "Last Contacted"
which is where I'm getting stuck. What I need this column to do is to
always be "Less Than" the report date range, if there was a date of
contact that existed prior to it.
An example would be that if my date range is from July 1st, 2007 to
July 31st, 2007, then the "Last Contacted" column should return records
prior to that date range. Below is my code. The section in Bold and
Italics is where I'm stuck.
-SELECT qry4ABCBank.Account, qry4ABCBank.ANum_fk, qry4ABCBank.Name,
qry4ABCBank.Date, qry4ABCBank.TotalDeposits, qry4ABCBank.Description,
qry4ABCBank.ÚltimoDeAddComments, qry4ABCBank.ÚltimoDeIncludeInReport,
qry4ABCBank.PositiveAlert, Last(qryAllMonths.CuentaDeANum_pk) AS
ÚltimoDeCuentaDeANum_pk, Last(tblFollowup.CallDate) AS
ÚltimoDeCallDate, Last(tblActions.NextStep) AS ÚltimoDeNextStep
FROM ((qryAllMonths RIGHT JOIN qry4ABCBank ON
qryAllMonths.ANum_pk=qry4ABCBank.ANum_fk) LEFT JOIN tblFollowup ON
qry4ABCBank.ANum_fk=tblFollowup.ANum_fk)LEFT JOIN tblActions ON
qry4ABCBank.ANum_fk=tblActions.ANum_fk
-WHERE ((TBLFOLLOWUP.CALLDATE) <
(FORMS!REPORTDATERANGE!BEGINNINGDATE))-
GROUP BY qry4ABCBank.Account, qry4ABCBank.ANum_fk, qry4ABCBank.Name,
qry4ABCBank.Date, qry4ABCBank.TotalDeposits, qry4ABCBank.Description,
qry4ABCBank.ÚltimoDeAddComments, qry4ABCBank.ÚltimoDeIncludeInReport,
qry4ABCBank.PositiveAlert
HAVING (((qry4ABCBank.Date) Between forms!ReportDateRange!beginningDate
And forms!ReportDateRange!EndingDate));
-