i want MS access to save the timestamp into a date/time field on my table everytime a transaction is entered. how do i achieve this without coding through macro?
Zyrag - There are many ways to do this, the simplest way would be to set up a form which based on the table with a text box which automatically enters the current date when you exit the last field of your table. (You would need to add a field called Timestamp to your table).
Set up a form based on the table and enter the following code into the On Lost Focus event of the last field:
Code:
Private Sub LAST_FIELD_LostFocus()
Dim cur_date as date
cur_date=Date
[TimeStamp].Value=cur_date
End Sub
You could lock this field or even make it invisible
thanks to both of you guys. you both have great ideas but Ian's way solved much of my requirements. I wasn't able to mention that i'm using vb6 as the front-end, but trystan's way also works great.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.