Does anyone know how to create a time stamp in a field when another field has
received data?
I'm scanning information into a database, but want to have a time stamp
linked to each scan. Is there a simple way to do this? Or will it involve
writing a macro?
It will involve writing VBA code - I don't think macros will do it
(and they're very limited in any case).
But... it's easy code.
How are you doing the scanning? A barcode scanner into a textbox? If
so, put code in the AfterUpdate event of the textbox. Open the Form in
design view; select the control; view its properties; click the ...
icon by the AfterUpdate event on the Events tab; select Code Builder.
Access will give you the Sub and End Sub lines, you just need to add
one more:
Private Sub controlname_AfterUpdate()
Me.txtTimestamp = Now
End Sub
Use the name of the form control bound to your timestamp field in
place of txtTimestamp.
John W. Vinson[MVP]