mrsmith14
asked on
outlook forms help
im attempting to make a timesheet for our office out of an outlook form. I need to figure out how to get my "hoursworked". i basically have 2 fields... time started and timeended. I need a third field to show the difference between these 2 so i can have the hours worked. How would I go about this? Im a complete noob to these outlook forms and vb.
ASKER
what i was in search of was the datediff() function.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What are your inputs? Textboxes? Read-Only Textboxes? Hard-coded labels?
What kind of data goes in your inputs? A start date and end date?
If I am guessing what you want correctly, perhaps the following information will help you:
Create a third textbox (field) called "hoursworked". Add a button called "calculate".
Add the following bit of code:
--------------------------
Private Sub calculate_Click()
hoursworked.text = timeended.text - timestarted.text
End Sub