Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2003
    Posts
    150

    Unanswered: Automatic Date insert

    Hi,

    How do i insert the date in a control on a form when a new record is created???

    Should i use the On Form Load event? What should the code look like?

    thanks!
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

  2. #2
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    574
    I would suggest putting =Date() or =Now() into the default value of the field.

  3. #3
    Join Date
    Nov 2003
    Posts
    150
    Hi,

    I guess my real question is that when i need to open the form again, would the original date be there, or the current system date?

    This is to insert dates on an Ordering form. Of course, i dont want this to change the date of my orders everytime i open them to review them...

    thanks!
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

  4. #4
    Join Date
    Oct 2003
    Location
    New York
    Posts
    23
    default value will work-if the text box's control source is a field in a table...once you create the record...the date reflects when the record was created.

    If you do not want anyone to have the ability to change the date on the form, turn of the tab stop and and lock it.

  5. #5
    Join Date
    Nov 2003
    Posts
    150
    That sounds like my case. My control is bound to a date field in my table.

    What happens though when i re-open the record in the same form?

    Would i be better off by creating another form specifically to open old forms? and not set the default value to =Now() ?

    thanks!
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

  6. #6
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    574
    Don't worry.

    The field will be set to the default value will only on insert. The default value will show up and can be changed manually if needed. The bound field will not be changed by the default value once it has been set.

  7. #7
    Join Date
    Nov 2003
    Posts
    150
    kool, thanks a lot, this is exactly the info i needed!

    Cheers, and have a good weekend!
    Cheers!

    Mr.Crud

    There are 10 kinds of people, ones that understand digital, others that dont

Posting Permissions

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