Fill blank fields with Value Zero (0)

  • Thread starter Thread starter Juan
  • Start date Start date
J

Juan

Hi,
I have the following field:
PERIODS: "PERIOD" & "" & " " & [PERIOD], which works fine.

But I want to put a Zero (0), where there is no data. I
tried PERIODS: "PERIOD" & "" & " " & Nz([PERIOD],"0")
But doesn't seem to work.
Am I doing something wrong?

Please advise any info.

Thank you,
juan
 
Hi,
I have the following field:
PERIODS: "PERIOD" & "" & " " & [PERIOD], which works fine.

Concatenating an empty string - "" - does absolutely NOTHING; you can
leave out the & "" with no change to your result.
But I want to put a Zero (0), where there is no data. I
tried PERIODS: "PERIOD" & "" & " " & Nz([PERIOD],"0")
But doesn't seem to work.
Am I doing something wrong?

I presume so... but without more information it's hard to say what!
Are there records in your table with a field named PERIOD for which
that field is NULL (empty)? Or are you trying to display a zero for
those periods for which no record exists in your table?

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Hello John,
sorry It seems that indeed I gave wrong info. I'm doing a
cross tab so the field should have been QUOTE since I'm
counting So I did a small sample using
Expr1: Val(Nz(Count(
),0))
and seems as it works. I looked in the posts and saw
similar question so took the formula.

I will post again if I have problems with this. But I do
appreciate your time.

Thank you,

Juan
-----Original Message-----
Hi,
I have the following field:
PERIODS: "PERIOD" & "" & " " & [PERIOD], which works
fine.

Concatenating an empty string - "" - does absolutely NOTHING; you can
leave out the & "" with no change to your result.
But I want to put a Zero (0), where there is no data. I
tried PERIODS: "PERIOD" & "" & " " & Nz([PERIOD],"0")
But doesn't seem to work.
Am I doing something wrong?

I presume so... but without more information it's hard to say what!
Are there records in your table with a field named PERIOD for which
that field is NULL (empty)? Or are you trying to display a zero for
those periods for which no record exists in your table?

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
.
 
Back
Top