Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble totaling a formula field 1

Status
Not open for further replies.
May 21, 2001
52
US
Can someone tell me why I cannot run a total on the following formula:

stringvar PUNCHIN:={TC1_TimecardMastefile.TimePunchedIn};
stringvar PUNCHOUT:={TC1_TimecardMastefile.TimePunchedOut};


IF GroupName ({@SHIFT})="7AM TO 3PM" AND PUNCHOUT > "15.00" THEN VAL(PUNCHIN) - 15.00
Else
IF GroupName ({@SHIFT})=&quot;7AM TO 3PM&quot; AND PUNCHIN < &quot;07.00&quot; THEN VAL(PUNCHOUT) - 7.00
Else
IF GroupName ({@SHIFT})=&quot;3PM TO 12AM&quot; AND PUNCHOUT > &quot;23.99&quot; THEN VAL(PUNCHIN) - 24.00
Else
IF GroupName ({@SHIFT})=&quot;3PM TO 12AM&quot; AND PUNCHIN < &quot;15.00&quot; THEN VAL(PUNCHOUT) - 15.00
Else
IF GroupName ({@SHIFT})=&quot;12AM TO 7AM&quot; AND PUNCHOUT > &quot;07.00&quot; THEN VAL(PUNCHIN) - 7.00
Else
IF GroupName ({@SHIFT})=&quot;12AM TO 7AM&quot; AND PUNCHIN <= &quot;23.99&quot;
THEN {TC1_TimecardMastefile.HoursWorked}-(Val(PUNCHIN)-23.99)
else {TC1_TimecardMastefile.HoursWorked}


PLEASE HELP!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top