This topic is locked
[SOLVED]

 Import with timestamp?

8/13/2011 10:36:11 PM
ASPRunnerPro General questions
G
GerryT author

I was wondering if anyone might know how I could have records that are imported to automatically be timestamped in to a field?
Thanks

Sergey Kornilov admin 8/14/2011

If you use SQL Server you can simply add a timestamp column to your database which will be updated automatically every time record is created or edited.

G
GerryT author 8/14/2011



If you use SQL Server you can simply add a timestamp column to your database which will be updated automatically every time record is created or edited.


We are using MS Access. Is there a way to do it using MS Access that you are aware of?
Thanks!

Sergey Kornilov admin 8/14/2011

Check an article at http://databases.about.com/od/tutorials/ht/Access_2010_Timestamps.htm. Probably it can help.
As an alternative you can use 'Before Insert Record' event to build a custom SQL query adding a timestamp.

G
GerryT author 8/14/2011



Check an article at http://databases.about.com/od/tutorials/ht/Access_2010_Timestamps.htm. Probably it can help.
As an alternative you can use 'Before Insert Record' event to build a custom SQL query adding a timestamp.


Thanks for your help. I figured it out, below is the steps I took.
Add a date or time stamp field
1.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.
2.In the first blank column, double-click the column header labeled Add New Field, type a name for the field, such as Date Added, and then press ENTER.
3.Select the column that you just added and then, under Table Tools, on the Datasheet tab, in the Data Type & Formatting group, select Date/Time in the Data Type list.
4.Click the Microsoft Office Button and then click Save, or press CTRL+S.
5.On the Home tab, in the Views group, click View, and then click Design View.
6.In the Field Name column, click your new field.
7.Under Field Properties, on the General tab, click in the Default Value property box, and then type Now() or Date().
8.Click the Show Date Picker property box, and then select Never from the list.
9.Save your changes, and then close the table.
Each time you add a new record to the table, Access automatically inserts the date or the date and time in the Date Added field.