Results 1 to 2 of 2
Thread: Disapearing fields
2001-03-29, 08:41 #1
- Join Date
- Mar 2001
- Thanked 0 Times in 0 Posts
I have a simple calculated field, say [Tothrs] that simply adds up [day1hrs] + [day2hrs] etc. for 7 days.
The problem is that unless I put a value in the fields for EVERY day then the calculated field in access does not show the answer. Some of my weeks do not have data for every day and just setting the default value in each field to zero does not make the [tothrs] field appear. Anybody got any ideas?
2001-03-29, 09:16 #2fionajhGuest
Re: Disapearing fields
I have a solution to this, but it may be a bit long winded. The problem, I think, is that you are adding up a series of fields of which 1 or more are null, and this leads to a null result for the whole calculation. You need to change your calculation so that, when a field is null, you add in zero for it. Try an expression of the form:
tothours = Nz(day1hours,0) + Nz(day2hours,0).....
the Nz function replaces a null value with whatever you give as the second parameter.