Results 1 to 5 of 5
  1. #1
    Cheez is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2021
    Posts
    9

    Recurring monthly due date

    looking for some help with a recurring date



    I have a form with a field call txtStartupDate bound to a table. i have an unbound txtbox with this code in it's row source. =DateAdd("m", 1, [CurrentDate]) but having trouble figuring out how get that to change after that. example 09/19/21 is startup date, DateAdd will return 10/19/21. how would you this going month after mouth.

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    Not really enough info provided - what do you do with the form? do you want to create these as records etc, depends how far into the future you want to go. But lets say it is 12 months.

    so you could create a table with a single field and populate it with 1 to 12 (call table tblMonths with a field called mthNum)

    then use a cartesian query

    SELECT dateadd("m",mthNum,CurrentDate) as dueDate
    FROM myTable, tblMonths

  3. #3
    Cheez is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2021
    Posts
    9
    Basically for look's as a reminder to me when my due date is. My credit card online account has this feature. The only value stored in a table is the first startup date. I thought this could calculated field on the fly. Am I going about this the wrong way? would it be better to store this in a table?

  4. #4
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,651
    Code:
    DateAdd(interval, number, date)
    Use dateDiff() as the argument for the Number in DateAdd()

    something like:
    =DateAdd("m",DateDiff("m",
    "Your starting date",Date()),"Your starting date")

    If its always going to be the same day each month you could use dateserial()

    Code:
    DateSerial(year, month, day)
    = dateSerial(year(date()),Month(Date()),day("Your starting date"))


    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  5. #5
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    and if you want the next due date rather than the one this month use i.e. startupdate is the 10th and today is the 20th September - the next duedate is 10th October


    =DateAdd("m",DateDiff("m",Startupdate",Date())-(day(StartupDate)<day(date()),StartupDate)

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

Similar Threads

  1. Replies: 15
    Last Post: 09-01-2015, 12:20 PM
  2. Replies: 6
    Last Post: 11-10-2012, 09:49 PM
  3. Automatic Recurring Entry
    By Al77 in forum Access
    Replies: 3
    Last Post: 02-15-2012, 04:24 PM
  4. Recurring data (date) in form
    By Cobbler in forum Forms
    Replies: 6
    Last Post: 08-19-2011, 11:34 AM
  5. Generating Recurring Tasks.
    By Jamesamorris in forum Access
    Replies: 3
    Last Post: 10-26-2010, 10:46 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