If I'm understanding your question correctly, you want to know how to make
sure a NULL field won't blow-up your calculations? That would be the NZ()
function:
NZ(fieldname,what-to-replace-NULL-with)
For instance:
NZ(Me.TotalTime,0) will put a zero in the TotalTime field if it is NULL.
So...
Me.Rate * Me.TotalTime will result in an error if TotalTime is NULL, but
Me.Rate * NZ(Me.TotalTime,0) will result in zero if TotalTime is NULL
Hope that helps...
Regards, Chris
P.S. Your calculations are wrong. The Total Tie for the middle column
should be 45 minutes, and the total time for the far right column should be 1
hour. Ya got the first column right, though!
"bob" wrote:
> The postings that i did get for time worked great. Now the issue is that i
> want to link the fields together so it will calculate all the mons that are
> left and pay a rate to that time. I have that part, that is take that field
> and times it by a number. so here is what it looks like
>
> Time IN 12:00:00 pm Time In 12:00:00pm Time In 12:00:00
> Time out 13:00:00 pm Time out 13:30:00 pm Time out 13:45:00 pm
> Delay Time 45 Delay Time 45 Delay Time 45
> Total Time 15 Total Time 30 Total Time 45
>
> now what i need to do is to add them up and if there is is not one that has
> anything in it that is will still calculate it. Meaning that if 1 and 2 are
> filled or just one is filled it will still calculate or add it up. I know
> that their need to be fields for the toal time and the pay. what i need is
> what to put for the null factor. if more info is need please ask
>
> Thank you for your time