Solved

outlook forms help

Posted on 2004-04-19
4
243 Views
Last Modified: 2010-04-17
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.
0
Comment
Question by:mrsmith14
4 Comments
 
LVL 3

Expert Comment

by:elantra
ID: 10863429
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
0
 
LVL 1

Author Comment

by:mrsmith14
ID: 10969262
what i was in search of was the datediff() function.  
0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 11188530
PAQed, with points refunded (500)

CetusMOD
Community Support Moderator
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question