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

Hiding zero values in text boxes?

P: n/a
Hi all,

I have a table with numerical information in it (scientific notation)
and a simple report that displays this information relevant to a query
on the data.

My question - Some of the data has a valid zero value. Is it possible
to make the report NOT display the zero value and only the cells that
contain a whole [or real] number?

For example: (pardon the crudeness)

Isotope flavor: (uCi) (%error uCi)
U-232 0.00E+00 0.00E+00
PU-232 4.54E-09 8.89E-10
....

How could I get the report to ignore the 'zero' cells?

Thanks!

-Tony
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 1 Oct 2003 15:16:14 -0700 in comp.databases.ms-access,
to*********@wipp.ws (Tony) wrote:
Hi all,

I have a table with numerical information in it (scientific notation)
and a simple report that displays this information relevant to a query
on the data.

My question - Some of the data has a valid zero value. Is it possible
to make the report NOT display the zero value and only the cells that
contain a whole [or real] number?

For example: (pardon the crudeness)

Isotope flavor: (uCi) (%error uCi)
U-232 0.00E+00 0.00E+00
PU-232 4.54E-09 8.89E-10
...

How could I get the report to ignore the 'zero' cells?


There's probably a conditional formatting trick by now but I never
read the manuals :-)

I have this function called Zn, it does the opposite of Nz so use it
as the controlsource of a textbox like "=Zn(fieldName)"

Paste following into a module
Public Function Zn(pvar)
' Return null if input is zero or ""
If IsNull(pvar) Then
Zn = Null
ElseIf IsNumeric(pvar) Then
If pvar = 0 Then
Zn = Null
Else
Zn = pvar
End If
Else
If Len(pvar) = 0 Then
Zn = Null
Else
Zn = pvar
End If
End If
End Function

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #2

P: n/a
Tony,

In the report, add an UNBOUND control.
Set it's control source to:

=IIf([YourField]<>0,[YourField],"")

Set it's Format Property to 'Scientific'.

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.
"Tony" <to*********@wipp.ws> wrote in message
news:e3**************************@posting.google.c om...
Hi all,

I have a table with numerical information in it (scientific notation)
and a simple report that displays this information relevant to a query
on the data.

My question - Some of the data has a valid zero value. Is it possible
to make the report NOT display the zero value and only the cells that
contain a whole [or real] number?

For example: (pardon the crudeness)

Isotope flavor: (uCi) (%error uCi)
U-232 0.00E+00 0.00E+00
PU-232 4.54E-09 8.89E-10
...

How could I get the report to ignore the 'zero' cells?

Thanks!

-Tony

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.