Results 1 to 4 of 4
  1. #1
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Advance Dates by 7 , 30, 90, 365

    I have a module that is supposed to do this but does not. Via my form I need to view Dates in increments by my set criteria. One of which is every 7 days. I have tried unsuccessfully to do this with queries and vba as well as my module. You have a list of dates where you need to see every 7th record, i.e. 7 days. Counting from the date which is in date field TransDate I then want to see dates in increments of 7.Example: A record was created on 2/1/13 then I want to see the next record be on 2/8/13 and so on. There is other criteria that comes into play but I have that managed. I attach pics of the qry and the module.
    Attached Thumbnails Attached Thumbnails qrynewmisssub.jpg   ModCalcNewDate.jpg  

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Guess I stumped the band.Anyway I have come up with a workaround. Making subform use the main forms last date as criteria it helps. Marking as solved and moving on.

    Thanks,

  3. #3
    RedGoneWILD is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2010
    Posts
    105
    I use something like this for advancing weeks and years



    Dim FirstDateOfWeek As Date
    Dim LastDateOfWeek As Date

    Private Sub AdvanceOneWeek()

    FirstDateOfWeek = DateAdd("d", 7, FirstDateOfWeek)
    LastDateOfWeek = DateAdd("d", 7, LastDateOfWeek)
    End Sub

    Private Sub RetreatOneWeek()
    FirstDateOfWeek = DateAdd("d", -7, FirstDateOfWeek)
    LastDateOfWeek = DateAdd("d", -7, LastDateOfWeek)
    End Sub

    Private Sub AdvanceOneYear()
    FirstDateOfWeek = DateAdd("d", 365, FirstDateOfWeek)
    Last DateOfWeek = DateAdd("d", 365, LastDateOfWeek)
    End Sub

    Private Sub RetreatOneYear()
    FirstDateOfWeek = DateAdd("d", -365, FirstDateOfWeek)
    LastDateOfWeek = DateAdd("d", -365, LastDateOfWeek)
    End Sub

  4. #4
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Thanks So Much, That Really Helps.

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

Similar Threads

  1. Counter Advance By One
    By burrina in forum Forms
    Replies: 2
    Last Post: 02-01-2013, 04:28 PM
  2. create fields on the fly or in advance?
    By zac123 in forum Access
    Replies: 4
    Last Post: 08-08-2011, 06:37 AM
  3. Advance to next row in report
    By jgelpi16 in forum Reports
    Replies: 2
    Last Post: 01-29-2011, 10:40 PM
  4. advance date reminder
    By Denis in forum Database Design
    Replies: 1
    Last Post: 11-14-2010, 07:40 AM
  5. Advance Report Help
    By OldCityCat in forum Reports
    Replies: 1
    Last Post: 09-18-2010, 07:58 AM

Tags for this Thread

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