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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

displaying fields with null values

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have a report, displaying peoples financial incomings and outgoings. I have used a query to accquire the data. However not everyone has all the information the report requires, is there anyway for the query to return a value (a zero would do) for those fields where the person has no information.
 
Lookup "different formats for Different Numeric Values" in the help file.

Format allows you to specify 4 different types of formats for 1 field, depending on the type of data (positive, negative, zero or null).
 
If the Report is Bound to the query then it will return Null where no data existed in the underlying tables. Bind the control to the field in the query and it will display a blank. - So what's the problem ?


If you want to display 0 instead of a blank then make the
ControlSource = Nz(FieldName,0)

If, on the other hand, you are manipulating data in code before displaying it then only Variant type variable can hold Nulls so you need to convert Nulls to zeros before working with them.

dblIncome = Nz(RecordSet!Income,0)

etc .. ..


'ope-that-'elps.

G LS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top