I have a form in Access 2007 with an "On Got Focus" procedure that is supposed to store the current value for a field.
Then, the after update procedure is supposed to take that old field value and use it to populate a comment with both the old and new values.
For some reason, it isn't taking OldGroup and putting it into my comment. The new value is there, but it won't store the OldGroup?
How can I get the onFocus() event procedure to store the OldGroup, and have AfterUpdate() use that string for the comment?
Code:
Private Sub with_group_GotFocus()
Stop
Dim OldGroup As String
OldGroup = Me.with_group
End Sub
Then, the after update procedure is supposed to take that old field value and use it to populate a comment with both the old and new values.
Code:
Set rs = CurrentDb.OpenRecordset("CommentHistory")
With rs
.AddNew
!Issue_ID = Me.ID
!ee = fOSUserName()
!Comment_Date = Now()
!Comment = "Group Assignment Changed from " & OldGroup & " to " & Me.with_group
.Update
End With
For some reason, it isn't taking OldGroup and putting it into my comment. The new value is there, but it won't store the OldGroup?
How can I get the onFocus() event procedure to store the OldGroup, and have AfterUpdate() use that string for the comment?