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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|