A
AccessIM
I always get confused when dealing with time in Access so I will greatly
appreciate any guidance.
The [TimeSpent] field is a calculation of the difference between two times.
In the code below, I am subtracting 1 hour from [TimeSpent] to remove breaks
and lunches:
DateAdd("h",-1,[TimeSpent])
This works great as is. However, I was told that there are times when the
shift will work overtime and receive an extra break which would change the
time allotted for breaks to from 1 to 1.25.
I would like the user to be able to enter the number of time allotted for
breaks each day. I tried changing the -1 to "[Enter Break Duration]" so that
the query would prompt the user to enter the time but it doesn't work.
Is there a way to enter varying numbers in place of the -1 in the query above?
appreciate any guidance.
The [TimeSpent] field is a calculation of the difference between two times.
In the code below, I am subtracting 1 hour from [TimeSpent] to remove breaks
and lunches:
DateAdd("h",-1,[TimeSpent])
This works great as is. However, I was told that there are times when the
shift will work overtime and receive an extra break which would change the
time allotted for breaks to from 1 to 1.25.
I would like the user to be able to enter the number of time allotted for
breaks each day. I tried changing the -1 to "[Enter Break Duration]" so that
the query would prompt the user to enter the time but it doesn't work.
Is there a way to enter varying numbers in place of the -1 in the query above?