automatically inserting current time

paulsimo

Registered User.
Local time
Today, 19:49
Joined
Nov 11, 2007
Messages
24
I am trying to get the current time to display in the same record as an identity number.
I am using a barcode scanner to identify the ID number. Using a program called BC Wedge it will place the ID number into a field in a table of the database. I also want it to record the current time the ID number was scanned.
I tried setting the default value of the 2nd field to Now(), however this does record the current time, but in a new record. This basically gives me a list of ID numbers from the barcode scanner and a list of recorded times, however all the times are one record out.

Is there anyway to get the recorded time to be placed in the same record as the ID number?

As far as I am aware the BC Wedge software needs to have the table in table view, although I may be wrong about this.

Hope somebody can help me with this.
 
Put your TimeStamp code in the BeforeUpdate event of the form.
 
And do not in this case use the .DefaultValue but the .Value property directly.
 
Many thanks for replying Rural Guy.
I am afraid I am quite new to using Access and don't fully understand what you have suggested. I don't suppose you could explain it to me in simple terms. Sorry to be such a pain.:o
 
In the BeforeUpdate event of your form put:
Me.TimeStampControlName.Value = Now()
...using your TimeStampControlName of course.
 

Users who are viewing this thread

Back
Top Bottom