Talk about driving me insane!!!

Louise

Registered User.
Local time
Today, 06:55
Joined
Oct 28, 1999
Messages
26
Thanks for the suggestions.

On the report that I'm referring to above this works fine. I actually put those details in under the Vba section where we were also debating this one.

However I'm trying to do it in another report within the same database and this one won't work.

Again it should be simple.
the report is based on a query finding records between 2 dates where a boolean field is true. If there are records then it displays them fine. However what I want to have is if there are no records to display then it instead displays a label to say "no records to display".

I have the label in the same detail section, property set to not visible, and then I'm using the following code in the OnFormat....

----code----
If isnull(me!lodgement_No) then
me!label.visible = true
else:
me!label.visible = false
end if
----code----

no matter what, it will not display the label.
also if I try to check for isempty or ="" then I get the error message:
"You entered an expression that has no value....blah blah blah"

Please can someone help me figure this out!
 
You could try using the Report_NoData event if you haven't already tried this, setting the label to visible if this event is fired.
 
Do you want to show a detail section for ALL dates within the range selected? And for those dates where you do have data and the correct bolean value, display it but for dates where there is no matching data and the incorrect bolean, display the message?

If that's the case then you may want rethink your approach and change the query so that it somehow includes every date within that range, not just the ones you have records for. Then do an IF statement in the On Format event for the detail section that tests for nulls and the correct values in your bolean field

I hope this helps
 

Users who are viewing this thread

Back
Top Bottom