Calculate

  • Thread starter Thread starter LED
  • Start date Start date
L

LED

Hi,

I could really use some help with this one. I'm new to this. I created a
form with the following fields [punch in time] and [punch out
time].

I have a macro that subtracts the time out from the time in to give me the
total hours worked.

I want to be able to subtract 30 minutes from the total if the total is = or
than 30 minutes. I am doing this in military time.

Is there an easy way to do this without VB or SQL?
Thanks for any help you can give me.
 
I have a macro that subtracts the time out from the time in to give me the
total hours worked.
Post how you did this and maybe someone can go the next step for you.
--
KARL DEWEY
Build a little - Test a little


LED said:
Hi,

I could really use some help with this one. I'm new to this. I created a
form with the following fields [punch in time] and [punch out
time].

I have a macro that subtracts the time out from the time in to give me the
total hours worked.

I want to be able to subtract 30 minutes from the total if the total is = or
than 30 minutes. I am doing this in military time.

Is there an easy way to do this without VB or SQL?
Thanks for any help you can give me.
 
Absolutely - here goes:

The action is SetValue
The Item is [Hours with Lunch Taken] the field where I need to have the
calculation of the following expression:

DateAdd("n",-30,([Punch Out Time]-[Punch In Time]))

That works great because if someone punches in at 19:37 and punches out at
20:37 and clicks on the command to run the macro above (the command states
to click this one if you took a lunch) it gives me 00:30.

But I am also trying to compensate for human error. So, if the person
punches in at 20:37 and punches out at 20:38, it results in 23:31. I would
want it to only result in 00:01 because I don't want someone to be paid for
23:31 hours if they only worked for one minute.

So it seems that I need to add an IIF statement somehow saying....if the
[Punch Out Time] is at least or more than 30 minutes then the [Punch In
Time], then and only then do I want it to subtract 30 minutes.

If you can help me...it would be greatly appreciated. Thank you for your
reply so far.


KARL DEWEY said:
total hours worked.
Post how you did this and maybe someone can go the next step for you.
--
KARL DEWEY
Build a little - Test a little


LED said:
Hi,

I could really use some help with this one. I'm new to this. I created a
form with the following fields [punch in time] and [punch out
time].

I have a macro that subtracts the time out from the time in to give me the
total hours worked.

I want to be able to subtract 30 minutes from the total if the total is = or
than 30 minutes. I am doing this in military time.

Is there an easy way to do this without VB or SQL?
Thanks for any help you can give me.
 
Back
Top