I am trying to add a timestamp after an entry. However, when I use the following code it replaces my entry with a timestamp. I am new to VBA so go easy on me please.
Code:Private Sub ACCOUNT_NOTES_AfterUpdate() Me.[ACCOUNT NOTES] = Now() End Sub
I am trying to add a timestamp after an entry. However, when I use the following code it replaces my entry with a timestamp. I am new to VBA so go easy on me please.
Code:Private Sub ACCOUNT_NOTES_AfterUpdate() Me.[ACCOUNT NOTES] = Now() End Sub
are you wanting to record the time of an update into a table or simply change a textbox value to the actual NOW() value after ACCOUNT NOTES is updated??
based on your post and code, the code is doing exactly what you're asking. you need to assign NOW() to a different textbox if you want to simply DISPLAY a timestamp.
I tried this code and received this error.
Do I need to declare the form I am working with? I figured that would be enough information to add to the [ACCOUNT DATES] field.Code:Private Sub ACCOUNT_NOTES_AfterUpdate() Me.[ACCOUNT DATES] = Now() End Sub
more than likely you are getting the error because ACCOUNT DATES is not a field with a date/time data type declared.
Correct. Didn't update the table. Thanks!