Results 1 to 3 of 3
  1. #1
    allyboy is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2016
    Posts
    1

    Lightbulb auto date and time issue


    hi . I have a problem with now() function . I want access to fill in automatically the current date and time when I enter a new field . but the problem is when I start to fill in records in datasheet mode , access will enter the current date/time in the next new field instantly ! so when I am gonna fill the records in the new field later it has the old date/time in its date/time record . is there any way to solve this issue ?!

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Where are you using the now() function? Are you using VBA or are you using the properties of the field @ the table or the properties of the control on the form?

    A default value will display in the "New Record" when the dataset is retrieved. Maybe some code in an afterupdate event is what you are after.

  3. #3
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,469
    Don't use Default value on that field, in the BeforeInsert event of form put Me.DateEnteredField = Now(). If you want this field to update each time the record is updated, put it in the BeforeUpdate event.

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

Similar Threads

  1. Auto Fill with Date and Time
    By Access_Novice123 in forum Access
    Replies: 6
    Last Post: 02-19-2015, 12:04 PM
  2. Recordset to update date/time Issue
    By excellenthelp in forum Access
    Replies: 7
    Last Post: 12-19-2014, 12:51 PM
  3. Date/Time Issue
    By dsaxena15 in forum Access
    Replies: 2
    Last Post: 02-09-2013, 02:29 PM
  4. ACCESS DATE/TIME Issue! Thanks!
    By keledidi in forum Access
    Replies: 6
    Last Post: 08-07-2012, 09:55 PM
  5. Date/Time Issue
    By bdhFS in forum Access
    Replies: 2
    Last Post: 08-02-2012, 04:22 PM

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