How to CALC a Null, Empty or Blank entry? (1 Viewer)

Gunnerp245

Gunner
Local time
Today, 03:06
Joined
Jan 16, 2006
Messages
39
I have a report with 8 sub-forms, based on 8 queries, which works great. Four are under the heading issues; the other four receipts. The sub-reports are for four specific time periods. It looks like this;
Issues | Receipts
Period 1 (10) | Period 1 ()
Period 2 (5) | Period 2 (10)
Period 3 (10) | Period 3 (5)
Period 4 (5) | Period 4 (15) Where (##) is the total number of items in that specific period

Now, in this case, period 1 query runs and finds nothing the sub-report has #ERROR.

I then entered, on the report, unbound boxes to which I specified in the control source to sum the total (##)e.g Period 1, Issues and Receipts. This works great too, EXCEPT when one of the Periods (no pun intended) is blank. Then it displays #ERROR. Here is one of the entries;

=[qry400a_Count_ISS<90da subreport].Report![Sumof<90daISSCount*] +[qry400b_Count_REC<90da subreport].Report![Sumof<90daRECCount*]


I have tried the Nz function, no dice. I read there is a difference between Null, Empty, and Blank.
But how would I construct it and where would I place it?
In the query?
Or the report box control source?

Thanks
Gunner...:confused:
 
Last edited:
R

Rich

Guest
Use the HasData method, you should be able to find examples posted here
 

Gunnerp245

Gunner
Local time
Today, 03:06
Joined
Jan 16, 2006
Messages
39
Rich,
Do you realize there are five pages of messages :eek: containing the word "HasData"; And you have answered nearly every one of them. I now have quite a few examples. Will be using one of them!
Appreciate your assistance!
Gunner...:)
 
R

Rich

Guest
I'll get around to putting a sample in the samples thread, one day;)
 

Gunnerp245

Gunner
Local time
Today, 03:06
Joined
Jan 16, 2006
Messages
39
Rich said:
I'll get around to putting a sample in the samples thread, one day;)

Much appreciate your assistance! The HasData functions like a charm.

Question:
How would I have known to use the HasData function? Not being a 'experienced' DBA.

Gunner...:)
 

Gunnerp245

Gunner
Local time
Today, 03:06
Joined
Jan 16, 2006
Messages
39
Success!

Gunnerp245 said:
Much appreciate your assistance! The HasData functions like a charm.

This is the format of the one I used:
=IIf([subreportname].Report.[HasData]=True,[subreportname].Report![fieldname],0)

Entered in the Control Source of the unbounded control on the Report (proper).
Gunner...:)
 

Users who are viewing this thread

Top Bottom