-----Original Message-----
I ran a quicky test and found two possible problems.
This stuff can be cranky at times for the most obscure
reasons.
Check the Name property of the textbox. If you used the
wizard or did a drag-drop from the query to establish the
textbox, the Name property will be the same as the
Control Source property. This confuses the IIf statement
as it seems not to know whether to act on the query field
name or on the textbox name. Change the Name property of
the textbox to SchoolCount or some such. Most likely,
Access will thoughtfully change the Control Source field
names to match, so you'll need to edit and change them
back to CountOfSchoolName. This could be all you need to
do.
If you still getting #Error, the problem is that
CountOfSchoolName isn't in fact returning 0 when there
are no names to count. That was the case in my quick
test. I changed the textbox statement to be:
=IIf(IsNumeric([CountOfSchoolName])=True,
[CountOfSchoolName],"")
Both of the above changes gave me the desired result.
HTH....Eric
-----Original Message-----
Eric, is your code correct? I just tried it with my own
field name of CountOfSchoolName in place of CountFrom
Query and it comes up as #error. Is this what you meant?
Thanks, Noel
-----Original Message-----
Set the textbox ControlSource to:
=IIf([CountFromQuery]>0,[CountFromQuery],"")
HTH....Eric
-----Original Message-----
Hi, I have a query that uses Count to produce a total
for
a certain field (SchoolName) and a report that prints
this value. How can I stop zero (0) printing? I only
want
to see a count if its 1 or above. Can anyone think of
some On Print event code I could use, or is there a
simpler way? Thanks, Noel
.
.
.
.