Does anyone know of a function as such that I can use to add an automatic date and timestamp in a column for when a user adds a record to the database table?
In the Navigation Pane, double-click the table to which you want to add the time stamp field. Access opens the table in Datasheet view. In the first blank column labeled Click to Add, select Date & Time from the drop-down list of data types. Access creates a new field and then displays a temporary field name.
You can create a non-nullable DATETIME column on your table, and create a DEFAULT constraint on it to auto populate when a row is added.
e.g.
CREATE TABLE Example ( SomeField INTEGER, DateCreated DATETIME NOT NULL DEFAULT(GETDATE()) )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With