- Local time
- Today, 17:53
- Joined
- Feb 19, 2002
- Messages
- 46,919
Never make the user do something you can do for him. Access forms provide a variety of events for you to use to run code depending on what you need to do. To log time to update, Use the Form's on Dirty event to log the start time:
SaveStartTime = Now()
Then use the Form's AfterUpdate event to log end time:
SaveEndTime = Now()
Follow that by an append query to log the times.
If you actually want to keep the times in the record being updated (I wouldn't do this), Use the Form's BeforeUpdate event to record the end time and follow that with:
Me.StartTime = SaveStartTime
Me.EndTime = SaveEndTime
And when the record is saved, so are the times. No need for an append or update query.
SaveStartTime = Now()
Then use the Form's AfterUpdate event to log end time:
SaveEndTime = Now()
Follow that by an append query to log the times.
If you actually want to keep the times in the record being updated (I wouldn't do this), Use the Form's BeforeUpdate event to record the end time and follow that with:
Me.StartTime = SaveStartTime
Me.EndTime = SaveEndTime
And when the record is saved, so are the times. No need for an append or update query.