A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Show phrase when no data for a report



 
 
Thread Tools Display Modes
  #1  
Old May 27th, 2010, 09:55 PM posted to microsoft.public.access.reports
FloodEbb
external usenet poster
 
Posts: 4
Default Show phrase when no data for a report

I have followed several threads on this subject which suggest using the IIf
statement in a new text box. Some suggest the IIf should be on a particular
field and some suggest on the report itself.

I am unable to get the required result and wonder when using a text box for
the control source (to enter the IIF statement in to), where it should be
placed on the report.

Specifically my report is named "DR Diving Record Rpt" and a field from it
is "ship"
I have tried adding a text box with the following
=IIf([DR Diving Record Rpt].[Report].[HasData], Null, "No ships today")
and also tried
=IIf([Ship] Is Null, "No Ships today", [Ship])

Any help please, thanks

  #3  
Old May 28th, 2010, 04:16 AM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Show phrase when no data for a report

FloodEbb wrote:

I have followed several threads on this subject which suggest using the IIf
statement in a new text box. Some suggest the IIf should be on a particular
field and some suggest on the report itself.

I am unable to get the required result and wonder when using a text box for
the control source (to enter the IIF statement in to), where it should be
placed on the report.

Specifically my report is named "DR Diving Record Rpt" and a field from it
is "ship"
I have tried adding a text box with the following
=IIf([DR Diving Record Rpt].[Report].[HasData], Null, "No ships today")


That should work if the text box is on the main report and
[DR Diving Record Rpt] is a subreport control in the same
section. Note that the name of the subreport control may be
different from the name of the report object it contains.

Since you did not mention a subreport, I am wonering if all
this is happening on a single report. If so, the expression
should be:
=IIf(Report.HasData, Null, "No ships today")

--
Marsh
MVP [MS Access]
  #4  
Old May 30th, 2010, 03:27 PM posted to microsoft.public.access.reports
FloodEbb
external usenet poster
 
Posts: 4
Default Show phrase when no data for a report

Many thanks to you both, I now have the required results.

It does all boil down to getting the correct code in a text box on the
correct part of the report (or sub-report)

"FloodEbb" wrote:

I have followed several threads on this subject which suggest using the IIf
statement in a new text box. Some suggest the IIf should be on a particular
field and some suggest on the report itself.

I am unable to get the required result and wonder when using a text box for
the control source (to enter the IIF statement in to), where it should be
placed on the report.

Specifically my report is named "DR Diving Record Rpt" and a field from it
is "ship"
I have tried adding a text box with the following
=IIf([DR Diving Record Rpt].[Report].[HasData], Null, "No ships today")
and also tried
=IIf([Ship] Is Null, "No Ships today", [Ship])

Any help please, thanks

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:08 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.