Close Report When SubReport Has No Data

AlanW

Registered User.
Local time
Today, 19:02
Joined
Aug 11, 2001
Messages
25
I have a main report that has a subReport. The main Report has no recordsource. (The subReport does) How can I close the whole Report if the SubReport has no data.
Any assistance appreciated
 
Hi Rich
If you use the NoData event in the subReport,(cancel=-1)that will not close the main Report. I tried adding:-

DoCmd.Close acReport,"MainReportName",,

to the NoData event of the subReport but that doesn't work.
Any ideas?
Thanks

[This message has been edited by AlanW (edited 02-06-2002).]
 
Use the HasData method in the NoData event of the main report, haven't tried it but it should work.
 

Users who are viewing this thread

Back
Top Bottom