report help

aftershokk

Registered User.
Local time
Today, 23:05
Joined
Sep 5, 2001
Messages
259
I never use Access reports so I am struggling.

I am trying to do this for a report field.

=IIf(IsNull([field]),"n/a",[field])

I keep getting ERROR

thanks
cheers
 
Is there a control with the same name as the field? Also, nz() would be simpler.
 
response

I am using this formula in the control. In the query this report is based on has this field.

what is nz()?
thanks
 
Nz(PutTheFieldNameHere,PutTheResultYouWantIfItIsNullHere)

replaces nulls with a predetermined value you set if the field is null.
 
Is myfield the same name as your text box? If so, change the name of the text box and then after saving the form, go back to the controlsource and change the name back to myfield as autocorrect will change the name to the text box name (but it shouldn't be that).
 
no luck with this idea - it is a currency field, does that change things?
 
Yes, if it is a number then:

=Nz([myfield],0)

(remove the quotes around the zero)
 
Can you compact your db (Tools > Database Tools > Compact and Repair) and then zip it and post it here?
 

Users who are viewing this thread

Back
Top Bottom