A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

how do i create a calendar in access, where i can input dates?



 
 
Thread Tools Display Modes
  #1  
Old July 19th, 2006, 10:01 PM posted to microsoft.public.access.forms
heather91387
external usenet poster
 
Posts: 1
Default how do i create a calendar in access, where i can input dates?

I'm trying to create a calendar so that I can have a box where associates can
input their leave dates and it will appear on a calendar? is this possible?
  #2  
Old July 20th, 2006, 09:37 AM posted to microsoft.public.access.forms
Ben
external usenet poster
 
Posts: 13
Default how do i create a calendar in access, where i can input dates?

Hi Heather,

When you say you want to create a calendar I assume you mean something like
an Outlook style view?

This is not easy in Access and I've never found a "perfect" solution - there
are various ActiveX components you can download but I've implemented a
solution using multiple instances of the same subforms keyed on date fields
on the parent from. For example for a "weekly" view, you would have seven
instances of the subform, displaying continuous records from the calendar
table - let's call them sub1...7. You then have corresponding date fields
on the main form - we'll call these subDate1...7. Each subform has it's
link parent field set to it's associated date field, and child field to the
underlying calendar date field.

As the user navigates (using command buttons on the main form) you
programatically cascade the date fields on the main form. So for example,
you have a master date field on the main form - called dateWeekCommencing.
You have a button to advance by a week - which updates dateWeekCommencing by
7 days (using dateAdd), and a button to go to the previous week in a similar
way. Your code then "cascades" this update to the subDate1..7 fields - a
simple loop through all 7 fields using dateAdd to advance by one day each
iteration. Lo and behold your subform instances show the calendared
activities for each of the seven days, a la Outlook. Looks like a calendar,
feels like a calender.

Now the bitter bit - this is easy to accomplish but would probably be
regarded as "bad practice" by those in the know. Multiple instances of
subforms are a bit kludgy, and although this works well with seven days,
slower machines or machines on slow networked databases may collapse if you
tried the same thing for a month! (That said I have made this work with
decent modern machines)

However, the only other option would be to use an ActiveX control - often a
real pain in Access. This is a pure Access based solution, and it DOES
work. You can bolt on a lot of extra functionality too - double-clicking on
a subform to enter a new event for example. I even managed to get dragging
and dropping to work after a fashion, by monitoring the mousedown event on
the subform!

If the above is too messy to follow, and you are interested in this
solution, I could always post a sample implementation to some webspace
somewhere for you to download and play with!

Best regards,

Ben.





"heather91387" wrote in message
...
I'm trying to create a calendar so that I can have a box where associates
can
input their leave dates and it will appear on a calendar? is this
possible?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:22 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.