473,507 Members | 3,678 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hiding zero values in text boxes?

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
2 5076
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1656
by: Chris Sharman | last post by:
I've got 3 'alternative' boxes, only one of which I want displayed, according to the value of an earlier select (so I'm using the <htmlelement>.style property from javascript). One is a div...
7
8637
by: Gertjan van Heijst | last post by:
Hi, I really hope someone can help me because I've already spend 2 days on this problem and I'm not getting anywhere. I think the problem is that I don't really understand how text boxes store...
7
1566
by: RC | last post by:
I have a form with five text boxes on it. The format for all the boxes is set as General Number. In four of the boxes the user can enter a number, the fifth box totals up the values in the other...
3
1681
by: ChadDiesel | last post by:
I'm new to Access and need some advice. I am trying to setup a database to print labels and reports for our shipments. I have set up a table with fields such as I have taken a snapshot of what...
1
2852
by: ChadDiesel | last post by:
I'm new to access and need some help. I have a form with a shipment destination at the top. I then have a subform that I enter boxes for that shipment. I have several shipments going at a...
3
1598
by: pesani | last post by:
Hi experts, I defined two integer values in the class. Like this public class IntegerClass public ID1 as Int32 public ID2 as Int32 End Class then iam instantiating this class and...
1
2482
by: Intrepid_Yellow | last post by:
Hi, I have the following code that runs my report generator. The user selects a table from a combo box, then whatever fields they want from a list box. (This part all works and the report runs...
1
1243
by: mfaisalwarraich | last post by:
Hi Experts Around the World. Well im new to this paradise (Access). i have no experties in Access but i can still work with my mind :). i wish to request you people as under: I made a table...
27
2742
by: matt | last post by:
Hello group, I'm trying to become familiar with the information hiding design rules, and I have a lot (3) of questions for all you experts. AFAIK, a generic module has 2 files: ...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7314
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
5041
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.