Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set Default Value 0.00

Status
Not open for further replies.

MooseMan

IS-IT--Management
Aug 25, 2001
63
0
0
CA
I have a report that I need to set the default value of a textbox to 0.00 but have had no luck doing it. If no value is returned I just get a blank.

I have tried the If Isnull in the format event.

Microsoft help also says there is a default value property for the textbox on the report but I cannot seem to see it.

All I need is for the text box on my report to return the value from the underlying query or $0.00.

Any help would be greatly appreciated.
 
Try using the If IsNull statement as an expression field in your query, or as the control source for the text box on your report.
 
Thnaks for replying,

Could you elaborate on how to use If IsNull as an expression in a query or a control source
 
In your query, replace the amount field in question with an expression field that will contain that amount (if there is one), or 0.00 if it's null.

In the query design view, put something like this in the Field: box, of course, substituting your field names:
Code:
=IIf(IsNull([MyControl]), 0.00, [MyControl]))
And, make sure the format of the text box that will display is set to 0.00, and you should be all set.....
 
How about using the NZ function! Try this

=NZ([MyControl],0.00)

good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top