Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Database Design / February 2008

Tip: Looking for answers? Try searching our database.

schedule recurring events an access database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
amy - 01 Feb 2008 19:54 GMT
I am trying to create an access database that will show upcoming appointments
with clients. These appointments are always recurring every month, 3 months,
or 6 months. I would like to enter the appointment and client information
into a table one time and then see the appointments when I open a weekly or
monthly report. Also, I want to mark the appointment complete in my table
after it is held so that a meeting that is scheduled but not held will
automatically show on the next week's calendar.

I have created several other somewhat complex databases in Access for my
company, but I am having trouble with this one. Any help that you can offer
on any of these points would be GREATLY appreciated!!!!!
Thanks
Allen Browne - 02 Feb 2008 01:16 GMT
As you found, recurring events are not the simplest thing on the planet.

The simplest approach is to create a table with fields like this:
   EventID         primary key
   StartDate      Date/Time  date of the first appointment. Requiried.
   PeriodType   Text           "d", "m", "q", or "yyyy".    Required.
   Freq             Number      how many periods between events. >= 0.
   EventCount   Number     how many events in the series.

Next, you need a counting table from 1 to the highest number of repeating
appointments you could need (perhaps 1000?) This table has one field named
(say) CountID, type Number, primary key, and you save the table as (say)
tblCount. Enter record from *zero* to the highest number. The code in this
link can populate the table for you:
   http://allenbrowne.com/ser-39.html

Now create a query using both tables, but with *no* join between them in the
upper pane of table design. This gives you every possible combination (a
Cartesian product), which we will use to get a record for each appointment
in the series.

In the Criteria row of the query under CountID, enter:
   < [EventCount]
This limits the query to the right number of events for the series.

Now enter an expression like this in the Field row of the query:
   EventDate: DateAdd([PeriodType], [CountID] * [Freq], [StartDate])
This gives you the date of each event in the series.

This approach is fully normalized and quite easy to implement. The major
limitation is that you cannot remove or reschedule one appointment in the
series. If you need that functionality, you may be able to do that with a
table of exceptions that uses an EventID and CountID and EventDate, so you
can switch the n-th appointment for a particular event to a different date
(or to Null for no date), and then outer join the above query with the
exception table to get the alternative date.

If that's not powerful enough, you can actually generate a record in a
related table for each event in the series. This gives great flexibility but
has several drawbacks:
- Doesn't cope with unlimited series (no end date)
- Harder to maintain. For example, if a change is made to the series, how to
you cascade that change to all events in the series, when some appointments
may be specific (out of the normal series)?

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

>I am trying to create an access database that will show upcoming
>appointments
[quoted text clipped - 12 lines]
> on any of these points would be GREATLY appreciated!!!!!
> Thanks
amy - 04 Feb 2008 05:18 GMT
Thank you for the info, I will try your suggestions. (I like to punish myself
:))
I love using Access for data management, but is there another program that
you can recommend that will do the job if I can't get this done? I like the
way that calendar programs like Outlook's calendar work, but I need to
perform searches and queries.

Thanks
Amy

> As you found, recurring events are not the simplest thing on the planet.
>
[quoted text clipped - 57 lines]
> > on any of these points would be GREATLY appreciated!!!!!
> > Thanks
Allen Browne - 04 Feb 2008 06:53 GMT
Outlook is the obvious one.

I'm sure there are plenty of others.

It's not too daunting in Access.  :-)

> Thank you for the info, I will try your suggestions. (I like to punish
> myself
[quoted text clipped - 7 lines]
> Thanks
> Amy
Allen Browne - 08 Feb 2008 13:46 GMT
In case you are still following this thread, here's a new article:
   Recurring events - how to handle recurring events that may never end
at:
   http://allenbrowne.com/AppRecur.html

Includes a sample database to download and pull apart.
The whole thing is done with queries (no code except for the interface.)
Works with Access 2000 and later.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Outlook is the obvious one.
>
[quoted text clipped - 14 lines]
>> Thanks
>> Amy
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.