Results 1 to 5 of 5
  1. #1
    dutyfree is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    3

    Change date after printing report

    Hi, I've set up a report which displays when a service is due on a certain month.

    I have been asked if I can automatically update the date of the displayed fieldsby a year after the report has been printed.



    e.g. if the report shows a service is due on 22/10/11, then after the report has been printed the date will be updated to 22/10/12.

    Is this possible to do on just the records displayed on the report, without changing every record in the table?

    Thanks for any help

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    You can do this with an update query.

    Here is a quick tutorial on how to do an update query

    http://www.youtube.com/watch?v=nFH0be4uG64

    Alan

    crosspost

    http://www.access-programmers.co.uk/...te=1&p=1106885

  3. #3
    dutyfree is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    3
    Okay so how do I implement this to add a year to the date, no matter what the year is? It's important to leave the customer alone with this so they don't have to keep coming back to me asking to renew their service dates.

    Thanks

  4. #4
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    You will probably need to implement some VBA code. How are you running your reports now? You probably need to incorporate the update query into the end of the code you are running for the report. You will need to incorporate the DateAdd function to make it automatically update the year.

    Alan

  5. #5
    dutyfree is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    3
    The report is running off a simple parameter query right now, where would I add in the dateadd function?

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

Similar Threads

  1. VBA - Number to Date Change
    By fpmsi in forum Programming
    Replies: 3
    Last Post: 10-18-2011, 12:06 PM
  2. How to Change Date Format
    By bulbul4u in forum Queries
    Replies: 1
    Last Post: 04-01-2011, 03:02 PM
  3. Can i change the format of DATE () ?
    By Nokia N93 in forum Access
    Replies: 2
    Last Post: 11-27-2010, 01:34 PM
  4. Change date from another control
    By NOTLguy in forum Forms
    Replies: 3
    Last Post: 11-20-2010, 11:24 AM
  5. Change Date Into Number
    By greenbag in forum Queries
    Replies: 0
    Last Post: 11-14-2008, 04:43 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