Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need advice
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00335495
Message ID:
00335506
Views:
14
>I am writing a log form. It logs work done. It's control source
>is a memo field bound to an edit box.
>
>I would like typical entries to look like this:
>
>02/22/00 08:00 - 10:15 # 2 Hrs 15 Mins
>Did some work on this. Talked to so and so about
>something
>
>02/22/00 10:30 - 11:45 # 1 Hrs 15 Mins
>Did more work on this.
>
>
>
>So how do I reliably insert the date/time stamp? And when? when the
>user clicks 'Start Timer' or 'Stop Timer'.
>
>And how do I know what line to insert it on? And what's to stop the user from overwriting the entire thing?
>

The way you've set it up, you can't. I'd break the above information into a couple of different fields in a table, then change the edit box to a list box. Your table would look something like:

Log
----
iid : Unique ID
dtStart : Date/Time value of start of process
dtEnd : Date/Time value of end of process
comment : Memo field - users comments

In the list box I'd show the start time, end time, calc. the difference, then the comment. In it's DoubleClick() event I'd add code that would open a form that had a shared datasession that let them view the entire comment, or change it (if you want them to be able to).

When they click on the Start Timer button, I'd add a new entry to the table. When they clicked on End Timer, I'd add the ending time to the new field and open the form that would let them enter a comment.

HTH
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Reply
Map
View

Click here to load this message in the networking platform