|
 |
access thread: Null, NZ, standard format and decimal places...
Message #1 by "Jenifer Mundstock" <jenifer@s...> on Sat, 22 Sep 2001 23:24:26
|
|
Hi all,
I'm having a problem in my Access 2000 report. I have a value in a table
that is a number field with the format set to standard. In my report, the
query for it has a join between this table and another table, thus
resulting in null values if there is no match in this table. I have
another field that takes that number and divides it by 3000. No problem
so far.
My report displays these values in text boxes and I have the text boxes
set to standard format with 2 decimal places. This results in proper
display (2 decial places, commas, etc.) of values that exist and blank if
there was no joining information. If I use the NZ function in the query
to display a zero in the box/field instead of the blank, the box now
ignores my decimal settings for the calculated field and displays ALL
digits after the decimal point.
I've tried everything I can think of and can't seem to force it to chop
off those extra digits.
Any ideas?
Jenifer
Message #2 by "Padgett Rowell" <padgett@i...> on Sun, 23 Sep 2001 22:56:55 +0800
|
|
Hmm, try Format(NZ(MyValue,0),"0.00")
-----Original Message-----
From: Jenifer Mundstock [mailto:jenifer@s...]
Sent: Saturday, 22 September 2001 11:24 PM
To: Access
Subject: [access] Null, NZ, standard format and decimal places...
Hi all,
I'm having a problem in my Access 2000 report. I have a value in a table
that is a number field with the format set to standard. In my report,
the
query for it has a join between this table and another table, thus
resulting in null values if there is no match in this table. I have
another field that takes that number and divides it by 3000. No problem
so far.
My report displays these values in text boxes and I have the text boxes
set to standard format with 2 decimal places. This results in proper
display (2 decial places, commas, etc.) of values that exist and blank
if
there was no joining information. If I use the NZ function in the query
to display a zero in the box/field instead of the blank, the box now
ignores my decimal settings for the calculated field and displays ALL
digits after the decimal point.
I've tried everything I can think of and can't seem to force it to chop
off those extra digits.
Any ideas?
Jenifer
Message #3 by "John Ruff" <papparuff@c...> on Sun, 23 Sep 2001 08:14:59 -0700
|
|
Try this,
IIf(Nz(dblNumber) = "", format(0,"0000.00"),
format(dblNumber,"0000.00"))
John Ruff - The Eternal Optimist :-)
-----Original Message-----
From: Jenifer Mundstock [mailto:jenifer@s...]
Sent: Saturday, September 22, 2001 11:24 PM
To: Access
Subject: [access] Null, NZ, standard format and decimal places...
Hi all,
I'm having a problem in my Access 2000 report. I have a value in a table
that is a number field with the format set to standard. In my report,
the
query for it has a join between this table and another table, thus
resulting in null values if there is no match in this table. I have
another field that takes that number and divides it by 3000. No problem
so far.
My report displays these values in text boxes and I have the text boxes
set to standard format with 2 decimal places. This results in proper
display (2 decial places, commas, etc.) of values that exist and blank
if
there was no joining information. If I use the NZ function in the query
to display a zero in the box/field instead of the blank, the box now
ignores my decimal settings for the calculated field and displays ALL
digits after the decimal point.
I've tried everything I can think of and can't seem to force it to chop
off those extra digits.
Any ideas?
Jenifer
|
|
 |