Best way to edit Calendar Form

mkaeser

Registered User.
Local time
Today, 00:59
Joined
Apr 14, 2014
Messages
74
I am making a calendar form in Access and want it to look like Google Calendar as much as possible. I am wondering if there is a good way to go about setting up the form to allow for multiple appointments scheduled for the same time. Designing the form to be in Week View with half hour blocks has me at 210 text boxes. As far as I can tell, there isn't a way to dynamically add in controls unless you are in design view. However, I have no idea how many appointments might be scheduled at the same time. I could add in as many text boxes as possible I guess, but that doesn't seem to be very efficient (and the base form is already at 210). Is there anyway to add in controls (such as text box or label) if a new appointment is added at the same time as existing ones?
:banghead:
 
short answer is you cannot add new controls except in design mode.

I'm sure if you google online you will find a template you can use, but if not then a suggestions is:

Work out what is the maximum appointments you are likely to get in a week and create the appropriate number of textbox controls for this number plus a few to be 'safe'.

I would name the controls with something like appt1, appt2, appt3 etc and set them to be hidden.

Then as you assign an appointment, you would make appt1 visible and using date and time and existence of other appointments sharing the same 'timeslot' modify the controls left, top, height and width properties to place it in the right place and right size in your calendar - you can do this with the move function.

The next appointment would be assigned to appt2 etc
 
So here is where I am at, and thoughts or advice is greatly appreciated:

The company I am designing this for wants the calendar to be in Weekly View, Monday - Friday, from 6 am to 8:30 pm. This calendar will be made up of several different calendars. There is a combo box that will allow you to filter by calendar ID, which is simple enough. However, the real challenge is the Admin calendar which displays ALL calendars at the same time. Each calendar has its own color, and they want up to 10 appointments to be possible for each 1/2 hour time block...

SOOO that leaves about 2100 necessary text boxes for this form!

So here is what I am trying:

I have 7 subforms for the days of the week, each sub form contains 300 boxes, so in total the calendar form has 2100. The boxes are all visible, so that anyone can click into a box and open the schedular to set a new appointment. But the borders and back colors are all set to transparent to keep it from looking bulky. So I have code that is cycling through a table using date criteria, figuring out how many calendars have appointments during this week, then cycling through each day by calendar ID to add in the appointment title to the calendar. I am currently working on a way to get appointments side by side.
 
So I have ten Text boxes in a row. Depending on the appointment length, it will subtract the TOP from the textbox at the end appointment time, from the TOP of the textbox at the start appointment time. The code will also look to see if a color has been applied to a text box to the right of it to determine how wide the textbox should be. For example, if there are no appointments at 6:00 am, the textbox width will adjust to be the full width of the form (about 1.5 inches). If there is another appointment,the box with the original appointment will adjust, as will the new appointment box so that both are displayed side by side at about .75 inches each, and so on.

On the close of the calendar, all the boxes will be adjusted back to their original sizes and colors.

Is this a bad way to go about doing this? All the boxes are there and called upon when needed, but I am not sure if resizing them so frequently will have any major issues downstream (other than possible lag). Any suggestions?
 
I know of something that looks like Google Calendar. :D

What exactly, again, is the point of at great pain creating functionality in Access that is already available in Outlook and Google Calendar?
 
Requests of the company that wants everything in Access :(

Currently they are using Google Calendar, but they have had issues in the past since it is so easy to accidentally move around an appointment and mess things up downstream. So they want something that looks like Google, in Access, so those issues will not happen. Also, they want to be able to track who is making and editing appointments.
 

Users who are viewing this thread

Back
Top Bottom