I’m not familiar with a control button performing a date/time stamp, but you
can try another method (much in line with Karl Dewey’s explanation) by
creating an Event Procedure for the unbound text control in your data entry
form. In design view, open the property sheet and under “After Updateâ€,
click on the first drop-down button to highlight Event Procedure. Then click
on the send button next to the first, and you will be able to enter your
event procedure (See below).
Assuming your unbound comment control is named “CommentUnboundâ€, and your
Memo control is named “Memo†remembering that the control names might be
different than the actual field names, at your discretion, here is a
suggested event procedure:
---------------------------------------------------------------------
Private Sub CommentUnbound_AfterUpdate()
Me.Memo = vbNewLine & vbNewLine & Format(Now(), “m-d-yy h:nn am/pm. â€) &
Me.CommentUnbound &†“& Me.Memo
Me.CommentUnbound = Null
DoCmd.GotoControl “CommentUnboundâ€
End Sub
--------------------------------------------------------------------
The last line is not critical. The “DoCmd.GoToControl “CommentUnboundâ€
allows the cursor to remain in the unbound control for another entry. The
procedure above allows for a double line feed so that the next entry into the
Memo control (field) will appear two lines above the previous entry for easy
reviewing. Your comments therefore appear in descending order with the
latest at the top.
Locking the memo control (field) and keying in text to an unbound control is
not always desirable, as staff can more easily type and review the comments
if they type directly into the Memo control (field). There are also many
times that the user will need to edit the text he/she enters, particularly if
the text is long. Your method doesn’t allow corrections or edits if the memo
field is locked. A worker may review the text entered into the Memo and
decide minutes later that the information needs to be modified. The only
recourse is to make another entry explaining a correction or addition to a
previous entry. It could be tiring to whoever has to read all the
notes/comments in the Memo field.
Also, there is a way to capture the name of the person logging in to the
network and if you have a field in your table such as “LastUpdatedBy†or
“Modifier†,etc., you could add that name to your Date/Time stamp so that you
have a date and time and worker’s name who adds comments to the Memo.
Explaining hwo to perform this task, however, requires a longer explanation
that doesn’t address your immediate needs.
Hope this helps.