How do I add a field to show that date the record was created in Access 2010?

Posted on 2011-10-25
Last Modified: 2012-05-12
I have a database that I need to add a field that will show when the record was created.  How do I do this?

Question by:mtcne
    LVL 92

    Expert Comment

    by:Patrick Matthews
    In your table design, include a column such as CreatedDate, make the data type Date, and for the default value use =Now() if you want the date and time, or =Date() if you only want the date.
    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    I suggest the following
    1) Create the New field in our table ... say DtRecCreated.

    Then, at the Form level, use this code in the Form BeforeInsert event, which looks like this:

    Private Sub Form_BeforeInsert (Cancel As Integer)
      Me![DtRecCreated] = Now()  ' Or just Date()
    End Sub

    I'm not a fan of putting default values on table property sheets ...


    Author Comment

    I did not mention the database already has records entered.  I am trying to determine the date created for records already entered.
    LVL 75

    Accepted Solution

    Not going to happen, sorry.  There is no inherent property that tells you this, at least that is accessible.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
    A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
    In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now