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 / Outlook / Programming Forms / September 2004

Tip: Looking for answers? Try searching our database.

Task Form - date completed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Yorke - 30 Sep 2004 13:59 GMT
Hi,

I am designing a custom task form and having a bit of
trouble with the "created time" and "completed time".

The created time gets entered automatically when the form
is opened, this is fine.  

I also have a Completed tick box and completed text box.  
The idea here being that when someone ticks
the "Completed" box the current date & time gets entered
into the completed text box.  So far though I can only
get the current date to appear and not the current time.

Also I would like to calculate the difference between
those times, giving me the length of time the task took
to complete.  and have it displayed as "1 day, 3 hours,
10 minutes" for example.  

I think I know how to do this calculation from reading
Microsoft Outlook Programming by Sue Mosher but I need to
get the value of the completed date and time first in
order to calculate how long the task took to complete.

Any help on both queries is greatly appreciated.

Mike
Sue Mosher [MVP-Outlook] - 30 Sep 2004 14:25 GMT
Outlook does not store any time element in the TaskItem.DateCompleted
property. You can't change that behavior.

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Hi,
>
[quoted text clipped - 23 lines]
>
> Mike
- 30 Sep 2004 14:42 GMT
Thanks Sue,

shame that outlook doesn't store the time element.  
Presumably though I can write some code to enter the
current date and time when I click something (like a tick
box)?

I can then use this to compare with the start time and
workout how long a task took to complete?

Mike.
>-----Original Message-----
>Outlook does not store any time element in the TaskItem.DateCompleted
[quoted text clipped - 29 lines]
>
>.
Sue Mosher [MVP-Outlook] - 30 Sep 2004 14:59 GMT
You can use code in the PropertyChange event to put the current date/time
(Now()) in a custom field when the item is marked complete. If you're not
familiar with that event, see http://www.outlookcode.com/d/propsyntax.htm

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Thanks Sue,
>
[quoted text clipped - 11 lines]
> TaskItem.DateCompleted
>>property. You can't change that behavior.
 
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.