Skip filing reports w/o data? (1 Viewer)

Gunnerp245

Gunner
Local time
Today, 16:04
Joined
Jan 16, 2006
Messages
39
I have a macro that files a particular set of reports; It works properly. Some of the reports occassionally will not have any data, depending on the data being analyzed.

I would like to NOT file the reports without data. How would I go about it?

Thanks,
Gunner...:confused:
 

Smart

Registered User.
Local time
Today, 21:04
Joined
Jun 6, 2005
Messages
436
I would do a dlookup on each query that rteh reporst are based on prior to calling the report.
If the result from the dlookup is null don't call the report

Dim ans1 as string

ans1 = nz(dlookup("Columnname","yourquery"),"")

if ans1 <> "" then
Run the report
end if
 

Gunnerp245

Gunner
Local time
Today, 16:04
Joined
Jan 16, 2006
Messages
39
Smart,
Appreciate the response. Where and how would I call the vba code you posted?
Gunner...
 

KeithG

AWF VIP
Local time
Today, 13:04
Joined
Mar 23, 2006
Messages
2,592
In the condition column of the macro
 

Users who are viewing this thread

Top Bottom