Results 1 to 8 of 8
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Bartlesville, Oklahoma
    Posts
    151
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Auto date/time entry (Access 97)

    I would like to have the current date & time show up in a form field automatically. In reading about various functions, the closest I can find to my need is the Now() function. However, it returns only the date from what I understand. What expression or function may I use to show the current date & time in a field?

    Thanx in advance,

    Steve Gardella
    Bartlesville, Ok.

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Auto date/time entry (Access 97)

    The Now() function returns both the date and the time. If it doesn't seem to be working check that you have a format for the control that shows both the date and time. It is possible that you not displaying all that the now() function has returned.

    The Date() function returns just the date.
    Regards
    John



  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Bartlesville, Oklahoma
    Posts
    151
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto date/time entry (Access 97)

    John,

    Thanks for such a quick response. I will check the format I've entered in the Properties for that field. If the format is in place, and the date/time still does not appear, what would you suggest?

    -Steve-

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Auto date/time entry (Access 97)

    If you use the General format, you'll get both date and time.
    Charlotte

  5. #5
    Star Lounger
    Join Date
    Mar 2002
    Location
    Kent, Kent, United Kingdom
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto date/time entry (Access 97)

    I note that you are using this function on a form.

    From expereince I would advise you to consider who the users of this form are going to be. The Now() function returns quite a lengthy date time expression - perhaps you might want to use some custom formats to make it suitable for your audience? (IMHO the now() result is ugly - if users are going to need this value it's worth tidying it up a bit)

    The help topic on custom formats might give you some ideas?

  6. #6
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Bartlesville, Oklahoma
    Posts
    151
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto date/time entry (Access 97)

    Thanks, I'll give it a try.

    -Steve-

  7. #7
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Bartlesville, Oklahoma
    Posts
    151
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto date/time entry (Access 97)

    How is the function result "ugly"? I want to make this as user friendly as possible. I'm pretty inexperienced with Access and am doing this project on my own to learn about Access, as well as develop a tool to use at work.

    I'm familiar with customizing formats and will definitely consider it if the function result is not useful.

    Thanks for your time.

    -Steve-

  8. #8
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Auto date/time entry (Access 97)

    I would suspect that is is "ugly" because it return both date and time, which may confuse users who are used to seeing the date in mmddyy or ddmmyy format, not with a timestampe attached to it.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •