Hide report label if sub report count is 0

myhnews

Registered User.
Local time
Yesterday, 21:58
Joined
Dec 30, 2004
Messages
53
Is there a way to hide a label on a report if the sub report count is 0?

Thanks
 
This can be done but it is hard to tell you the best way without seeing your particular circumstances.

I would probably use DCount to count the records that match the main report's RecordID in the subreport's table or query and then set the label control to Visible=False if it equals zero but there may be a better solution.

All of this involves some fairly basic VBA.
 
DCount should work.

can you please give me a basic sample of DCount to count the records in the subreport?

Thanks
 

Users who are viewing this thread

Back
Top Bottom