I have an excel database with over 4,000 records. Each month, I have
to run 100 reports based on this data. Currently, I am using multiple
DCount Formula to filter the data. My problem is I to manulaly update
one of the Dcount Criteria fields before I print the report.
Specifially, I enter 1 in the first cell within the DCount Criteia. I
than print a report based on this data. I then enter 2 in the frist
cell and print a report. I do this for over 100 reports. Is there a
way to automate this process?
Thanks in advance.
Dave Peterson - 06 Apr 2004 23:27 GMT
How about recording a macro when you do it once to get the range addresses
straight.
Maybe something like this:
Option Explicit
Sub testme01()
Dim iCtr As Long
For iCtr = 1 To 3 '100
Worksheets("sheet1").Range("b2").Value = iCtr
Application.Calculate
Worksheets("sheet1").PrintOut preview:=True
Next iCtr
End Sub
I left it as print preview and for 1 to 3--didn't want to kill too many trees
while testing.
> I have an excel database with over 4,000 records. Each month, I have
> to run 100 reports based on this data. Currently, I am using multiple
[quoted text clipped - 7 lines]
>
> Thanks in advance.

Signature
Dave Peterson
ec35720@msn.com
Bob - 07 Apr 2004 04:56 GMT
Thanks. It worked perfectly.
> How about recording a macro when you do it once to get the range addresses
> straight.
[quoted text clipped - 27 lines]
> >
> > Thanks in advance.
Dave Hawley - 07 Apr 2004 04:23 GMT
Hi Bob
If you go here:
http://www.ozgrid.com/download/default.htm
and download "DFunctionsWithValidation.zip" it may help.