Results 1 to 6 of 6
  1. #1
    anoob is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2011
    Posts
    60

    Update with Todays Date on Open

    Hello,
    This is probably a simple question. I have a table with three date fields:

    [EnterDate] [InvoiceDate] [DueDate]

    This table is displayed and edited as a form, and since there is no linked data or relationships or anything like that I did not mess with a query. (As my name suggests, I am quite a noob.)

    For "EnterDate", my default value is set to "Date()". This is correct because I just want to add the date the record was added and not have it update.

    However, is there a way to make "InvoiceDate" show todays date automatically? So whatever day I send out my invoices I don't have to re-enter this value? All I can find online is way over my head. I would also like to use the "DateAdd()" function to add 30 days to the "DueDate" field, but I figure once I can get "InvoiceDate" to update automatically I can do the same with "DueDate".

    The invoice is for a subscription type service, so really the only thing that I need to update automatically are these two fields. I will not need (or rarely need) to edit records once a client is added, just send quarterly invoices for the same service.

    Any ideas would be greatly appreciated.
    Many thanks.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Why haven't you treated the InvoiceDate the same as the EnterDate control?

  3. #3
    anoob is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2011
    Posts
    60
    Thank you for the response.

    I was under the impression that "Date()" got the current date and put it in the field - and then it did not change on it's own.

    Am I incorrect?
    I have this as a default value for similar fields in other tables and that is how it seems to operate.

    These records will be entered and stored for long periods of time, so I need to save the date the client was entered, and I was hoping to find a way to make InvoiceDate show the current date - that way all I had to do was open the database and click "print", and each record would have the proper invoicing dates on it already.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by anoob View Post
    Thank you for the response.

    I was under the impression that "Date()" got the current date and put it in the field - and then it did not change on it's own.

    Am I incorrect?
    I have this as a default value for similar fields in other tables and that is how it seems to operate.

    These records will be entered and stored for long periods of time, so I need to save the date the client was entered, and I was hoping to find a way to make InvoiceDate show the current date - that way all I had to do was open the database and click "print", and each record would have the proper invoicing dates on it already.
    What you say is true for the Default Value. You can keep the value for [InvoiceDate] current by putting [InvoiceDate] = Date() in the Current event of your form.

  5. #5
    anoob is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jan 2011
    Posts
    60
    Ohhhhhh.....
    I did not even realize that was there!
    Thank you so much.
    I think that worked perfectly but I'll know in about 11 hours...

    Thanks!!

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Glad we could help.

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

Similar Threads

  1. Replies: 2
    Last Post: 10-11-2010, 09:09 AM
  2. Adding todays date
    By EDEd in forum Forms
    Replies: 2
    Last Post: 10-08-2010, 06:27 PM
  3. Open form on update of field in another form.
    By thekruser in forum Forms
    Replies: 5
    Last Post: 09-13-2010, 02:12 PM
  4. Open a report with a date condition
    By Grooz13 in forum Reports
    Replies: 3
    Last Post: 08-02-2010, 02:35 PM
  5. Extra date field update
    By georgft in forum Forms
    Replies: 0
    Last Post: 09-17-2008, 06:51 AM

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