I removed all format specifications and checked all the control sources. The
latter were accurate. I saved and closed and reopened the report. The zeros
were all there.
I then put #,### in the format property for the controls containing integers
(not percentages). The zeros dissappeared.
I am beginning to wonder if the report is corrupted. I had some problems
earlier and pulled all objects into a new blank database -- but I forgot to
turn off the automatic Track Name change feature. So I just completed
creating another fresh database and turned off the auto track name feature
before I imported the objects. It may be too late for this report.
--
susan
Duane Hookom said:
Make sure the control sources are correct and try delete everything out of
the Format property.
--
Duane Hookom
Microsoft Access MVP
:
My apologies for my lack of clarity.
When I run the query, the zeros are present when I view the query grid.
When I run the report that's based on the query, there are no zeros. But
number of 1,000 or more contain the ",". This was the origin of my post,
that the Format property #,### was not working. (Now I know because the data
is now strings instead of numbers.)
--
susan
:
I don't know what you mean by "Now, the query grid has the zeros, but they
don't appear on the report. However, the number separator does appear."
How do the numbers appear in the report's record source query? What's a
number separator?
--
Duane Hookom
Microsoft Access MVP
:
Oops. I spoke too soon.
I made the change on a few fields in the query to test it -- and it seemed
to be working as desired. Then I continued to change the other fields.
Now, the query grid has the zeros, but they don't appear on the report.
However, the number separator does appear. I compacted the database in case
it had developed a quirk.
Any thoughts?
--
susan
:
I went ahead with Val, but will try 0 in the Format Property. Thanks so much.
--
susan
:
You can use the Format property to display 0 where the values are null. Just
leave the data as it is.
If you think you want to do the conversion to 0 in the query, try:
E306: Val(Nz([Err_306],0))
--
Duane Hookom
Microsoft Access MVP
:
The numbers in the record source query are left aligned. In the previous
query that this query is based on, they were right-aligned. And yes, Nz seems
to have made the difference. I need to show 0s for null values. Here's a
sample.
E306: Nz([Err_306],0)
--
susan
:
I expect the "number field" is being converted to a string. When you view the
datasheet of the report's record source, is the "number field" right or left
aligned?
Are you using and IIf() or Nz() or similar in the query?
--
Duane Hookom
Microsoft Access MVP
:
I don't understand why this is not working, because I've used it before in
reports. The underlying field in the table is a number field. I put it in the
"Format" property of the control.
Any suggestions?