Re: Query - Calulations
From: Michel Walsh (vanderghast_at_VirusAreFunnierThanSpam)
Date: 05/17/04
- Next message: Gerald Stanley: "Re: Invalid bracketing of name....;"
- Previous message: Michel Walsh: "Re: Using "Not" in criteria"
- In reply to: BWilliam: "Query - Calulations"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 17 May 2004 13:27:01 -0400
Hi,
Nz( EndTime-StartTime, 8.0/24.0 )
returns the difference,unless one of the two fields is null, then, in that
case, it return 1/3 of a day.
Nz( Nz( EndTime, Now) - StartTime, 8.0/24.0 )
return the running time, up to now, if endTime is null, but startTime is
known ( day in progress, we know there has been a start, but don't know the
exit time yet),
endTime-StartTime if both are known,
1/3 of a day if startTime is unknown (Null)
Pick your choice.
Hoping it may help,
Vanderghast, Access MVP
"BWilliam" <anonymous@discussions.microsoft.com> wrote in message
news:6CF65A31-BE50-4BB4-8FD3-2B39156ECFB3@microsoft.com...
> I have a small employee database that tracks time away from the
Office/Desk. When an employee is going to be away from the office all day or
away for meetings information is gathered by entering the employee ID, date,
reason code; and one of the following:
> If gone all day a checkmark (yes/no) is selected to reflect out all day.
> If gone for only part of the day the start and end time is entered (i.e.,
9:00 AM to 11:00 AM).
> I have two calculations that will determine the amount of time for each
field; Total Amount: [EndTime]-[StartTime] and All Day:
Switch(tblAttendance!OutAllDay=Yes,8). I am able to total these two fields
separately in a report but I'm not able to get a combined total.
> Additonal Informaiton: If "Out all Day" is not s elected the field is
null, If "Out all Day" is selected then the start and end time fields are
null.
>
> My Question is that I now need to add these to calculations together for a
grand total (per employee, per group, total for all), I've not been able to
come up with anything that works.
- Next message: Gerald Stanley: "Re: Invalid bracketing of name....;"
- Previous message: Michel Walsh: "Re: Using "Not" in criteria"
- In reply to: BWilliam: "Query - Calulations"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|