Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid use of Null in Report footer 1

Status
Not open for further replies.

hefly

Technical User
Feb 6, 2008
134
US
I have created a report footer where I want to sum a field.

I have used the following:
Code:
=Sum(Nz([Net],0)) 

And =Sum([Net])
Both return an error "Invalid use of null."

How do I sum a field with nulls in my footer?

Thank you.

Hefly
 
There shouldn't be an issue if these are control sources of text boxes in the Report Footer (or Report Header or Group Header/Footer).

Are you trying to do something in code?
Does the report return records?

Duane
Hook'D on Access
MS Access MVP
 
I don't know what the problem was... There was no code. I kept getting an error "Invalid Use of Null."

Was it my formula, or something may have been wrong with the footer?

I deleted the footer and then re-created the footer with the following code which ran.


Code:
=(Nz(Sum([Net]),0))

Whatever the issue was, whether the footer, or the code I was using, the report is running now.

Thank you Duane!

Hefly
 
As before, I am clueless.

Thank you for your help.
 
hefly,
You had stated originally [blue]Both return an error "Invalid use of null."[/blue]
I'm not sure how you determined this expression/control was causing the issue.


Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top