From: rebeca on
The following statement is populating a key field in my report. What
I am attempting to do is when the report startdate does not match the
date in the Beginning AR field (which is populated using DLOOKUP from
another table.

If the dates to not match, it needs to look at the query and sum the
total1 field for all dates between the BeginningARDate and the
ReportStartDate. For example, if I run a report with a January 2
startdate and the Beginning ARDate of January 1, it should sum the
total1 value for January 1 to the beginningardate and the finance
charge. I'm sure it's something simple, I just can't see it.

=IIf([beginningardate]=[reportstartdate],[begar]+[finchg],[begar]+
[finchg]+DSum("total1","SN AR Log Query2","Physician = '" &
[Physician] & "'" & "AND [batch date] >= #" & [BeginningARDate] & "#
AND #" [batch date] < #" & [ReportStartDate] & "#"))

Thanks!!!!
From: Douglas J. Steele on
Already answered in another newsgroup to which you posted the same question.

If you feel you need to post to more than one group (HINT: it's seldom
necessary), please have the courtesy to cross-post (send the one message to
all groups at once), rather than multi-post (send individual messages to
each group). In this way, all responses to your post will be available
together, regardless of what group the responder was in, and the rest of us
won't have to read your post multiple times. (It also uses fewer server
resources)

If you're using Google's web interface to post, you can type the names of
the various groups into the "To Newsgroups" box, separating each newsgroup
name with a comma.

Note that it's generally consider to be A Bad Thing to cross-post to more
than about 2 or 3 newsgroups.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"rebeca" <rwfrhs(a)gmail.com> wrote in message
news:17bc49ec-e133-4209-acd6-66bee80acebb(a)f8g2000yqn.googlegroups.com...
> The following statement is populating a key field in my report. What
> I am attempting to do is when the report startdate does not match the
> date in the Beginning AR field (which is populated using DLOOKUP from
> another table.
>
> If the dates to not match, it needs to look at the query and sum the
> total1 field for all dates between the BeginningARDate and the
> ReportStartDate. For example, if I run a report with a January 2
> startdate and the Beginning ARDate of January 1, it should sum the
> total1 value for January 1 to the beginningardate and the finance
> charge. I'm sure it's something simple, I just can't see it.
>
> =IIf([beginningardate]=[reportstartdate],[begar]+[finchg],[begar]+
> [finchg]+DSum("total1","SN AR Log Query2","Physician = '" &
> [Physician] & "'" & "AND [batch date] >= #" & [BeginningARDate] & "#
> AND #" [batch date] < #" & [ReportStartDate] & "#"))
>
> Thanks!!!!