Payroll Form

incognito8095

Registered User.
Local time
Yesterday, 18:01
Joined
Jul 8, 2005
Messages
10
Hey there,

I have a form that has 7 days (Mon, Tue, Wed, Thur, etc...). The time is formatted like 08:00AM. Under each of those controls I have something that uses the expression: =(((([Sunday End Time]-[Sunday Start Time])*24)*60)/60), which if the hours were 08:00AM - 04:00PM, would give me 480, and then I convert it to hours (8). I have all these fields defaulted to 12:00AM to 12:00AM. I have another box that totals all these fields and uses the expression: =([SUH]+[MH]+[TU]+[WH]+[TH]+[FH]+[SAH]). These boxes are all of the results of End time-Start time. Now the problem. I have a payrate field on the form that looks at the hours worked, so I needed to separate overtime from straight. I have a box that looks like this: =IIf([Hours Worked]>"40",40,([Hours Worked])). The hours worked box is the result from the sum of SUH+MH+, etc...The problem is, each time I have any hours in there less than 10, it will return a crazy result. If I only enter 8 hours, it enters in the hours worked box: 40 hours. If I add 2 more hours, it fixes itself. What is the problem. I would be happy to send the file over, or ANYTHING to get this to work.

Sincererly,

Raymond
 
It sounds like it's treating your number as text instead of a number (alphabetically, 8 is > 40). Take the quotes off the 40 in the test.
 
Thank You!!!

I figured that's what it was doing. I spent so long, writing in code, changing the expression. I figured it was a text issue when it returned the right value if there was a 2 digit character in the field. OH MY GOD!!! Awesome! Thank you for your help.

Raymond
 

Users who are viewing this thread

Back
Top Bottom