Creating a calender

T

Tom Symonds

I have a db with a table (Stories) with a date field.
I'd like to be able to display entries from this table in a calender-type
view -- ie a list of days of the month, with those entries from the Stories
table that correspond with each date.
Any ideas how to achieve this.
Do I need a 'Dates' table, linked to Stories -- if so, how do I fill it with
correct dates from the calender.
Or can I do it with some sort of clever form.

Ideally the best thing would be to export my records automatically to
Outlook - rather than reinvent the wheel, but this would be beyond my
limited VBA skills I think!
Suggestions please?
 
J

John Nurick

Hi Tom,

For an all-Access solution, try something along these lines:

1) Create a table of dates (tblDates) with a single field
TheDay - DateTime (Primary key)
and populate it with a record for every day in the period you're
interested in. (One easy way to populate the table is to use Excel: fill
down a column to get all the dates, and then paste-append them into the
Access table.)

2) Create a query (let's call it qryAllDates) that joins tblDates and
your Stories table on the date field, including all records from
tblDates and related records from stories. This gives you a list of all
dates, with the associated stories.

3) Add a calculated field to the query to give you the day of the week
DayOfWeek: Weekday([TheDay])

4) Create a crosstab query based on qryAllDates, using DayOfWeek to
create one column for each day of the week to give you a calendar-like
view.

5) Display this in a continuous form.



Alternatively, it shouldn't be hard to use VBA and Automation to create
an Appointment item in an Outlook calendar for each record in your
table.

The Microsoft knowledgebase article below is shows how to import items
from Access using code running in Outlook, and should serve as a
starting point. It's possible to revise the code so it runs in Access
and controls Outlook raher than vice versa.
Q208232 OL2000: How to Programmatically Import Items from MS Access
http://support.microsoft.com/default.aspx?scid=kb;en-us;208232

It's worth searching the knowledgebase for other relevant articles - but
before you do that, search at http://www.slipstick.com, which has all
sorts of information on programming Outlook.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top