473,659 Members | 3,162 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 5084
On 1 Oct 2003 15:16:14 -0700 in comp.databases. ms-access,
to*********@wip p.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*********@wi pp.ws> wrote in message
news:e3******** *************** ***@posting.goo gle.com...
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
1664
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 containing text, which I amend as appropriate with innerhtml One is an image. One is a div containing 4 input text boxes, which are disabled or not as appropriate. I've tried .style.visibility = "hidden" / "visible" (correctly leaves
7
8644
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 'empty' values. I'm trying tot do the following. I have a continous sub form that lists transactions. On the top level form I have some text boxes to let the user specify the transactions between which dates should be listed. To do this I have...
7
1575
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 boxes. The data control source for the total box is: =+++ This works as long as each box has either a number or a zero. If one of the boxes is empty I get nothing in the total box. I would prefer not to have a default zero in the boxes because...
3
1686
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 I would like to do: http://www.chadworld.com/images/form.jpg All of these fields are in a table called: Ship_Info
1
2865
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 time, so I can use the control at the bottom of the form to move from shipment to shipment and I can see all the boxes in each shipment. I'd like to put a subtotal for the shipment weight and box types at the bottom of the subform.
3
1601
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 assigning these values to the text box
1
2493
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 fine). There is then a combo box they can select a field from (eg CompanyID etc) and then the list box below that contains the values (eg Microsoft, Novell etc). These are all multi-select list boxes. Now I can get the code to work if the user...
1
1249
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 called mainTable, two fields of this table one is SNO and other is Relation are text data types. SNO can be any string values but relation stores value from a combo fox on form called mainForm based on mainTable. Relation values can be "Self",...
27
2765
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: ================ module.h ================ #ifndef __MODULE_HDR_INCLUDED__
0
8428
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8337
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8628
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6181
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2754
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1978
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.