By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,486 Members | 2,067 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,486 IT Pros & Developers. It's quick & easy.

#Error

P: n/a
DS
How do you reference a field that comes up with an Error in an IIf statment?

IIf([Text104]Is Null,0,{Text104])

Text104 is coming up #error because the sub-report has no records in it,
Which is fine, I just need the field with the Expression in it to
come up Zero if Text104 has no value to it.
Thanks
DS
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
DS wrote:
How do you reference a field that comes up with an Error in an IIf
statment?

IIf([Text104]Is Null,0,{Text104])

Text104 is coming up #error because the sub-report has no records in it,
Which is fine, I just need the field with the Expression in it to come
up Zero if Text104 has no value to it.
Thanks
DS


Try:

=Nz([Text104],0)

in the control's ControlSource property.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
Nov 13 '05 #2

P: n/a
Your code is wrong. Should be:

= IIf(IsNull([Text104]), 0, [Text104])

--

Tony D'Ambra
Web Site: aadconsulting.com
Web Blog: accessextra.net
"DS" <bo******@optonline.net> wrote in message
news:P0***********@fe08.lga...
How do you reference a field that comes up with an Error in an IIf
statment?

IIf([Text104]Is Null,0,{Text104])

Text104 is coming up #error because the sub-report has no records in it,
Which is fine, I just need the field with the Expression in it to come up
Zero if Text104 has no value to it.
Thanks
DS

Nov 13 '05 #3

P: n/a
DS wrote:
How do you reference a field that comes up with an Error in an IIf
statment?
IIf([Text104]Is Null,0,{Text104])
Try this Nz([text104],0) if Null then it will replace with 0.
HTH
Text104 is coming up #error because the sub-report has no records in
it, Which is fine, I just need the field with the Expression in it
to come up Zero if Text104 has no value to it.
Thanks
DS


--
Regards,
Neil
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.