G
Guest
Hi,
I'm not a newbie to Access, as I have been using it for years but only in
it's most basic form with simple expressions etc. I want to develop an
existing 60mb database and my first task is to calculate employee time on
jobs...
So, an employee is called out to a job and spends say 161 minutes on site.
I can produce this with two 'Date and Time' fields (from and to) and
multiply the funny number by 1440.
I want to convert the 161 minutes into hours but not so that it displays '2
hours, 41 minutes' as we bill by the hour. I've tried using 'DLookup' but I'm
struggling to get the required value. I can do it in Excel using a nested
'=IF' formula or a '=VLookup' formula.
I've set up another table with the following values
Minutes Hours
1 1
2 1
3 1
(4 to 60) 1
(61 to 120) 2
(121 to 180) 3 etc. etc.
How can I query this table so that it finds '161' in the list of 'Minutes'
and then calculates the '3' to end up in the original table?
Is this the right way to do it or is there a much easier way?
Thanks.
I'm not a newbie to Access, as I have been using it for years but only in
it's most basic form with simple expressions etc. I want to develop an
existing 60mb database and my first task is to calculate employee time on
jobs...
So, an employee is called out to a job and spends say 161 minutes on site.
I can produce this with two 'Date and Time' fields (from and to) and
multiply the funny number by 1440.
I want to convert the 161 minutes into hours but not so that it displays '2
hours, 41 minutes' as we bill by the hour. I've tried using 'DLookup' but I'm
struggling to get the required value. I can do it in Excel using a nested
'=IF' formula or a '=VLookup' formula.
I've set up another table with the following values
Minutes Hours
1 1
2 1
3 1
(4 to 60) 1
(61 to 120) 2
(121 to 180) 3 etc. etc.
How can I query this table so that it finds '161' in the list of 'Minutes'
and then calculates the '3' to end up in the original table?
Is this the right way to do it or is there a much easier way?
Thanks.