I am a beginner and need help to create appointment schedules for clients. Some clients need appointment weekly while others need monthly appointments. Can access generate a table of dates in the future based on start and end dates?
The short answer is yes.
Don't know exactly what you're looking for, but here's a routine to create some future dates based on today + some number of days. Perhaps it will assist or give some idea of what you might do.
Date is an Access function representing today's Date.
This routine adds days to today's date to get a series of future dates. It adds 0, then 14, then 28...up to 140
Successive dates should be 2 weeks apart.
Code:
Sub test1()
Debug.Print " Date Now "; " DaysToAdd " & " FutureDate"
Dim futureDate As Date
For i = 0 To 140 Step 14
futureDate = Date + i
Debug.Print Date & " " & i & " " & futureDate
Next i
End Sub
Every time someone want to build an appointment application in Access I have to ask why do this in Access. If you have Access I assume you have Outlook, so why not use Outlook? Even a good programmer can not code the functionality that Outlook gives you.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.