On No Data

asp_learner

Registered User.
Local time
Today, 01:09
Joined
Jun 7, 2001
Messages
46
For my report when there is no data,

i currently have the following code:
'Closes the report if there is no data
MsgBox "There are no Known Losses for the period you requested.", , "No Data"
Cancel = True

without that code I would get #error if there isno data. I came up with one solution which is to make that field invisible when there is no data.

Me![Text90].Visible = False
Now how do I set the field to say on the paper, there is no data available.

Thanks,
Eva

[This message has been edited by asp_learner (edited 06-13-2001).]
 
What you could do is set the details visible property to false. You should have a label in your report Header, or anywhere besides the detail section, that says none and has it's visible property set to false. In the No Data event, put this code..

Me.Detail.Visible = False
Me.ReportFooter.Visible = False
Me.PageFooter.Visible = False
Me.PageHeader.Visible = False
Me("lblNone").Visible = True

This will hide all the sections except the Report Header, which will have your header on it and a newly visible Label that says None! Hope that helps..

Doug
 

Users who are viewing this thread

Back
Top Bottom