Results 1 to 4 of 4
  1. #1
    ebbolles is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2015
    Posts
    3

    Cannot Get Access to Accept its Date Stamp Code

    I am trying to build a new database, my first in 2013. I want to stamp each record with a date of entry. I created a field called DateAdded and set the data type to date/time. I set the format to short date and told it never to use calendar picker. Then I tried to set the default value to the date the record is created. Using the Expression builder I inserted =Date(). Access gives me a dialog box saying there is some sort of syntax error in the code. I have tried: Date(), Date, =Date, =Now(), Now, Now(), and =Now. All produce the same error message. What do I do?

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I understand you want the default value of a field to be the current Date, formatted as Short date. You can do this at the table level. While in Design View of your table, select your Date field. Double check the Data type is set to Date/Time. Now, go to the properties of your field and adjust the Format to the desired "Short Date". Now, go to the Default Value property and type the Date function.

    I believe you need to type Date() in the default value property. Otherwise, it is just Date.

    Be aware that a Time will also be included in your Date. Just because you formatted your field as Short Date does not mean there is no Time associated with your date. The time will be 12 midnight. It may be best to use a full timestamp. Using Now() as the default value will use the System time and date the record is first created.

  3. #3
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    it should just be Date() or Now(). Suggest you don't use the expression builder

  4. #4
    ebbolles is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2015
    Posts
    3
    Thanks. The basic problem was that I was doing exactly as described and getting the error message. I finally figured out that the problem was in a completely different VB module, so I fixed that.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Column history - date and time stamp
    By Hatye in forum Access
    Replies: 5
    Last Post: 11-15-2013, 01:26 PM
  2. Date Stamp when a field is changed
    By winterh in forum Access
    Replies: 1
    Last Post: 04-25-2012, 07:27 AM
  3. Replies: 2
    Last Post: 10-26-2011, 02:48 PM
  4. Date and Time Stamp
    By zoooza84 in forum Access
    Replies: 2
    Last Post: 08-06-2011, 04:53 AM
  5. Date Stamp On Entry of Record
    By tscholts in forum Forms
    Replies: 3
    Last Post: 04-01-2008, 07:08 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums