Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / March 2005

Tip: Looking for answers? Try searching our database.

Calculation help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Arul - 01 Mar 2005 14:35 GMT
I'm working on a timesheet form.  This timesheet is for two weeks.  There's a
summary at the bottom of the timesheet that shows the total regular hours for
two weeks, total OT for two weeks, etc.  Regular hours for a week is 40
hours.  If say for example, hours worked for week1 is 43 and hours worked for
week2 is 40, then the regular hours in the summary section should show 80
hours and OT should show 3 hours.  Similarly if hours worked for week1 is 30
and hours worked for week2 is 41, then the regular hours in the summary
section should show 71 hours and OT should show 0 hours.  This is where I
have the problem.  Currently, I'm adding the total hours in week1 and week2
and showing it as Regular hours.  This is obviously incorrect.  Since it
would involve some sort of case statement I'm not sure how it can be done.  
Can someone please help?
Vaibhav - 01 Mar 2005 16:52 GMT
Hi Arul

If you know the total hours in a week has to be 40 then

TotalHours=hrsWeek1+ hrsWeek2
OT Hours=TotalHours-80
If OTHours<0 Then
   OTHours=0
End If

HTH

> I'm working on a timesheet form.  This timesheet is for two weeks.
> There's a
[quoted text clipped - 13 lines]
> would involve some sort of case statement I'm not sure how it can be done.
> Can someone please help?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.