Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Mar 2001
    Thanked 0 Times in 0 Posts

    Disapearing fields

    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?
    thanks John

  2. #2

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts