DateStamp on user activity

sha7jpm

Registered User.
Local time
Today, 03:54
Joined
Aug 16, 2002
Messages
205
I have a database which follows the progess of a report from start to finish,

there are 5 stages numbered imaginatively 1 to 5. I am looking to record the date that the code changed.

rather than get the user to record the date, I propose having 5 fields i.e. date of stage 1. date of stage 2 etc

so when the user changes the progress to stage 2 , the date field has the date imputted into it.

I can only seem to get the TOday() syntax, which is obviously volatile.

any ideas on how to stop the date from changing?

ta

John :confused:
 
Okay.....

I would suggest settin the Stage field to automatically update when certain criteria or fields are filled in!

Or make [Stage] a drop down box like I did for testing. The only problem with that is you don't actually want to allow users to return to a previous stage (assumption on my part). So...the automatic update would be the best bet.

Then consider using the code below. I know...there might be another way of doing it, but that's just the way that I figure out with limited time.:rolleyes: Hope it helps. If you have questions...just post back!

Private Sub Stage_Change()

Me.Stage1Date.Locked = True
Me.Stage2Date.Locked = True
Me.Stage3Date.Locked = True
Me.Stage4Date.Locked = True
Me.Stage5Date.Locked = True

If ([Stage] = "Stage 1") Then
Me.Stage1Date.Locked = False
Me.Stage1Date = Date
Me.Stage1Date.Locked = True
Else
If ([Stage] = "Stage 2") Then
Me.Stage2Date.Locked = False
Me.Stage2Date = Date
Me.Stage2Date.Locked = True
Else
If ([Stage] = "Stage 3") Then
Me.Stage3Date.Locked = False
Me.Stage3Date = Date
Me.Stage3Date.Locked = True
Else
If ([Stage] = "Stage 4") Then
Me.Stage4Date.Locked = False
Me.Stage4Date = Date
Me.Stage4Date.Locked = True
Else
If ([Stage] = "Stage 4") Then
Me.Stage5Date.Locked = False
Me.Stage5Date = Date
Me.Stage5Date.Locked = True
End If
End If
End If
End If
End If

End Sub
 
Last edited:

Users who are viewing this thread

Back
Top Bottom