Link to home
Start Free TrialLog in
Avatar of mrsmith14
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.
Avatar of elantra
elantra

Not exactly sure what you are trying to do.  Perhaps you can be more descriptive in the problem you are facing.

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
Avatar of mrsmith14

ASKER

what i was in search of was the datediff() function.  
ASKER CERTIFIED SOLUTION
Avatar of CetusMOD
CetusMOD
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial