Results 1 to 13 of 13

Thread: Date (2002)

  1. #1
    Star Lounger
    Join Date
    Jul 2002
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Date (2002)

    How can I get Access to fill in a date field automatically from the system date?

    Thanks
    Rumblebelly

  2. #2
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date (2002)

    Set the Default Value to

    Date()

    If you want date and time use

    Now()
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  3. #3
    Star Lounger
    Join Date
    Jul 2002
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date (2002)

    Bryan,

    It did not work. I have it set to short date and it is masked. Does this make a diiference?

    Thanks
    Rbelly

  4. #4
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date (2002)

    It work for me, with both an input mask and set to SHort date in a table and a textbox on a form.

    Have a look at the screen capture to see my settings.

    The only difference is I'm using A97 and A2K. A2002 should be the same.
    Attached Images Attached Images
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

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

    Re: Date (2002)

    Are you doing this from a form, a table or a query? In any case, unless you run an update query, no date will be inserted into existing records, only new records.
    Charlotte

  6. #6
    Star Lounger
    Join Date
    Jul 2002
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date (2002)

    A table. I am trying to get a textbox labeled Date Recived in a table to get the date.
    Bryan,
    Your form display is great. I will see what i can do tommrow and get back to you folks!
    Thanks
    R Belly

  7. #7
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date (2002)

    It works in a table as well.

    Here is a screen shot of the properties.
    Attached Images Attached Images
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

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

    Re: Date (2002)

    But still only on new records.
    Charlotte

  9. #9
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date (2002)

    Yep. True enough.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  10. #10
    Star Lounger
    Join Date
    Jul 2002
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date (2002)

    Ok It works but it flashes the date and then disappears on the form when I move on to the next field.

    So now my question is , How do I keep it there?
    Thanks
    R Belly

  11. #11
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Date (2002)

    Is your field on your form bound to a field in a table where the data is stored? If not it won't be saved. Note that this only works on new records you are adding - it will not change old records which have a null in the field.
    Wendell

  12. #12
    Star Lounger
    Join Date
    Jul 2002
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date (2002)

    I am sure it is not bound. How do I do that?

    Thanks

    Rbelly

  13. #13
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date (2002)

    Does the form have Record Source set and does the textbox have a Control Source set?

    If both of the answers are yes, then the control is bound to the table.

    If either is no, then it is unbound.

    You need to have it bound to automatically update the underlying table.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

Posting Permissions

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