G
GD
I have a subform (defaulted as continuous form) within a form that consists
of comment, user initials, and date fields. I need the user initials & date
fields to auto fill when an entry is made to the comment field. For those
comments that already exist, the user initials & dates need to remain as they
were at the time of their entry. My code in the subform is:
Private Sub txtComment_AfterUpdate()
If Me.txtComment <> "" Then
Me.txtCommentBy = CurrentUser()
Me.txtCommentDate = Date
Else
Me.txtCommentBy = ""
Me.txtCommentDate = ""
End If
End Sub
Private Sub Form_Current()
If Me.txtComment <> "" Then
Me.txtCommentBy = CurrentUser()
Me.txtCommentDate = Date
Else
Me.txtCommentBy = ""
Me.txtCommentDate = ""
End If
End Sub
Does the form need code, too?
Right now, for every form I open the user initials & dates change to my user
initials and today's date. Have I explained it adequately?
THANKS!!!
of comment, user initials, and date fields. I need the user initials & date
fields to auto fill when an entry is made to the comment field. For those
comments that already exist, the user initials & dates need to remain as they
were at the time of their entry. My code in the subform is:
Private Sub txtComment_AfterUpdate()
If Me.txtComment <> "" Then
Me.txtCommentBy = CurrentUser()
Me.txtCommentDate = Date
Else
Me.txtCommentBy = ""
Me.txtCommentDate = ""
End If
End Sub
Private Sub Form_Current()
If Me.txtComment <> "" Then
Me.txtCommentBy = CurrentUser()
Me.txtCommentDate = Date
Else
Me.txtCommentBy = ""
Me.txtCommentDate = ""
End If
End Sub
Does the form need code, too?
Right now, for every form I open the user initials & dates change to my user
initials and today's date. Have I explained it adequately?
THANKS!!!