Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Time stamp on word 97 form

Status
Not open for further replies.

Anthony904

IS-IT--Management
Jul 15, 2004
153
US
I have a word 97 document that is basically a log form with form fields throughout the document..

There are two users that update this form. One crew works in the day (8:00am to 7pm) and the other at night (7pm - 7am).

The problem that I am having is with the date. The day crew enters their part of the form and saves it with today's date. The night crew does their part and saves it also but now it's tommorrows date.

The users want one date for each complete form. (a complete form consist of both crews completing one document) Preferrably the day crews date.

I thought about adding a field on my form so that the user could manage the dates themselves.. but I thought about it and I would like less user interaction with the dates.

does anyone have a better idea of doing this?

THANKS!
 
Hi Anthony,

It would be possible to do this with a formula field that subtracts 1 day from the SAVEDATE value if the saved time was between midnight and 8am. This wouldn't require any user intervention/input.

However, if the night crew was late in saving (ie after 8am), you'd still end up with the wrong date. Of course, if you can count on these documents not being saved by the night crew later than, say, 10am, and not being saved by the day crew until after, say, 3pm, the extra latitude would allow the field to be coded more reliably.

You'd still run into problems, though, if the file was saved again at a later date ...

Similar approaches, with similar limitations, could be coded with macros that intercept the file saving process.

Cheers
 
As macropod states, what you want to do is a simple matter once you have decided the boundaries. e.g. if you stipulate that a day lasts from 8am until 7:59am the next day, you could simply subtract 8 hours from any date you want to store (i.e. subtract 8/24).

You'd probably want two fields. One is the actual time that the form was saved and the other consists of only the date part (no time).

e.g.
ActualTimeSaved = Now
DateSaved = CDate(INT(ActualTimeSaved - 8/24))

But you have to decide on your date rule first.
 
Thanks for the suggestions guys!

I'll work out some rules..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top