DCOUNT/DLOOKUP Question

R

rkelly31

I'm building a report that looks up specific Dealer Codes. I'm creating a
summary page within the report that gives different counts & sums. One of
the things needed is a comparison of the current month numbers(what report is
based on) and a previous month's numbers. I have a unbound control set up
for this, but I can't find the correct function to do this. I have a query
set up with the information already.
 
D

Dirk Goldgar

rkelly31 said:
I'm building a report that looks up specific Dealer Codes. I'm
creating a summary page within the report that gives different counts
& sums. One of the things needed is a comparison of the current
month numbers(what report is based on) and a previous month's
numbers. I have a unbound control set up for this, but I can't find
the correct function to do this. I have a query set up with the
information already.

Have you considered using a subreport for this, with the subreport based
on your comparison query?
 
R

rkelly31

Thanks for the response.
I've never built a subreport. Any idea of where to get a good start?
 
D

Dirk Goldgar

rkelly31 said:
Thanks for the response.
I've never built a subreport. Any idea of where to get a good start?

You'll probably do well to read the help topics on the subject. The
gist of it is:

First build a report, based on a query that shows the data you want,
summarized to the level you want. This report will show data for all
main-report records, but you don't have to worry about filtering it,
because the subreport control will do that. Design the layout of the
report with its position in the main report in mind. Save the report
with a name that will indicate to you that it's intended as a subreport.
I usually use a "sr" prefix for subreports, but others have their own
naming conventions.

Once you got the subreport saved, open the main report in design view,
and drag the subreport from the database window and drop it on the main
report, in the section where you want it to appear. This will create a
subreport control on the form at that location, with its Source Object
property set to the report object you dropped there. Check the other
properties of the subreport control, especially on the Data tab of its
property sheet. Access may have successfully guessed what the Link
Master Fields and Link Child Fields should be, so that the data shown in
the subreport corresponds to the data shown in the main report in that
section. However, Access may not have guessed correctly, or at all, so
you may have to fill in those properties.

Everything else is just a matter of formatting the main report and
subreport the way you want.
 
Top