UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
10 Pages V « < 8 9 10  (Go to first unread post)
   Reply to this topicStart new topic
> Ms Outlook Style Calendar For Access Projects, Access 2003    
 
   
Peter Hibbs
post Apr 10 2019, 09:06 AM
Post#181


UtterAccess VIP
Posts: 1,670
Joined: 17-June 10
From: Dorset. UK.


Hi marinko888,

welcome2UA.gif

Yes, there are two ways to do that :-

Option 1. Make sure the main calendar form is not open and then open the form frmCalendarWeek in Design mode.
Drag the Detail section down so that the Form Header section is about three times the height.
Click on one of the date controls in the Form Header section which will select the transparent button called cmdDate which has been placed over the date controls.
Move this button down a few centimetres so that you can then select the date controls with the mouse.
Drag the mouse over all the date controls (take care not to move them) so that they are all selected (that is Text box controls txtSun to txtSat and txtSunday to txtSaturday).
Change the Back Color property so that the background color is whatever you want.
Now move the button cmdDate back over the text boxes so that it is in its original position (and perhaps click on the Bring to Front icon on the Arrange tab to make sure it is above the text boxes).
Move the Detail section back up to its original position and then close and save the form.

Option 2. Select the Text box controls txtSun to txtSat and txtSunday to txtSaturday) one after another in the Property Sheet drop down box and change the Back Color of each control in turn.

Note also that you may need to change the Back Color property of the Form Header section to your new color (depending on how you want it to look).

This will change the Weekly calendar colors but you may need to do something similar on the Month and Day calendars using the forms frmCalendarMonth and frmCalendarday.

HTH and let us know if you have any problems,

Peter Hibbs.
Go to the top of the page
 
marinko888
post Apr 11 2019, 04:08 AM
Post#182



Posts: 12
Joined: 9-April 19



Hi Peter,
first of all thanks for your help, I have made changes as suggested. Can you please help me to change the color of today's selected day from pink to something else?

Attached File  Selection.png ( 3.33K )Number of downloads: 1
Go to the top of the page
 
Peter Hibbs
post Apr 11 2019, 05:58 AM
Post#183


UtterAccess VIP
Posts: 1,670
Joined: 17-June 10
From: Dorset. UK.


Hi,

OK, this facility uses Conditional Formatting to change the header colors and the procedure to change them may vary slightly depending on which version of Access you are using, but hopefully this will help.

As before, open the form frmCalendarWeek in Design mode and select each of the 14 Text box controls mentioned above in turn (note that, unfortunately, you cannot do this by selecting all the controls together and changing the colors in one operation).

With a control selected, click on the Conditional Formatting icon on the ribbon to open the Conditional Formatting Rules Manager pop-up form.
Click the the Edit Rule button which opens the Edit Formatting Rule pop-up form and then change the foreground and background colors using the Background color and Font color drop down boxes, as required. Note that on my version of Access (A2013) the colors don't always change immediately and it has to be done two or three times to make it work properly).
Click OK to save and close both forms and repeat for each of the 14 Text box controls.

Note also that on later versions of Access you can change all the controls without having to close the Conditional Formatting form each time by using the drop down box at the top of the Conditional Formatting Rules Manager pop-up form to select the next control and using the Apply button.

HTH,

Peter Hibbs.
Go to the top of the page
 
marinko888
post Apr 11 2019, 06:31 AM
Post#184



Posts: 12
Joined: 9-April 19



Thanks for your reply!

I have figured that out but the selection of current day in month and day views is most probably made somewhere in VBA code...

Attached File  Selection1.png ( 1.47K )Number of downloads: 1


Attached File  Selection2.png ( 1.6K )Number of downloads: 0


Can you please help me with those two?

Thanks for all your help,
Marinko
Go to the top of the page
 
Peter Hibbs
post Apr 11 2019, 08:12 AM
Post#185


UtterAccess VIP
Posts: 1,670
Joined: 17-June 10
From: Dorset. UK.


Hi Marinko,

The daily calendar is pretty much the same as my first reply except that the Text box control name is called txtToday and that also uses Conditional Formatting (although you may need to enable the control on the Edit Formatting Rule pop-up form with the Enable button to see the colors).

The monthly calendar (frmCalendarMonth) also uses Conditional Formatting to show today's date and the control names in this case are called Day1Date to Day7Date. However, as with the Weekly calendar, there is a transparent button (cmdDay) placed over the controls which you may need to move out of the way first if you use that method to select the controls (probably easier to use the second option of selecting the first control name in the Property Sheet section and then change each of the 7 controls from within the Conditional Formatting form). Also you may need to click on the Enable button to display the colors on the Edit Formatting Rule pop-up form (as mentioned above).

Let us know if you have any further problems.

Peter Hibbs.
Go to the top of the page
 
marinko888
post Apr 11 2019, 09:40 AM
Post#186



Posts: 12
Joined: 9-April 19



Hi Peter,
Thanks for your help, I didn't know about the Enabled Formatting property so the issue has been resolved.

I have another problem. I have spotted a little bug in the calendar logic - when you go back in a Previous year and select one date you get Appt details in the list box:

Attached File  Selection3.png ( 18K )Number of downloads: 2


and when you click again, this time on a Next year button, Appt details info remains in a list box. The list box should be empty...

Attached File  Selection4.png ( 15.77K )Number of downloads: 3


I have tried to resolve this with the List box Requery when the Next year button is pressed but haven't got any results.

Thanks,
Marinko
Go to the top of the page
 
Peter Hibbs
post Apr 11 2019, 11:13 AM
Post#187


UtterAccess VIP
Posts: 1,670
Joined: 17-June 10
From: Dorset. UK.


Hi Marinko,

OK, this is not really a bug. If you look at the date at the top of the list of appointments you will see that this date does not change when you move to the next year and so the list of appointments for that date will remain in the list.

If you want to change that date to the same date in the next year (so, for example, 01/02/2019 would change to 01/02/2020) then the only way to do that is to add one year to the Current Date field when you change to a different year. If you find the sub-routine called CalendarUpdate (see below) in the VBA code module for form frmCalendarMain and add the three lines marked below that may do what you want. It may also have other unwanted effects that I haven't discovered so keep a back up copy of the database file as well.

HTH,

Peter Hibbs.

CODE
Public Sub CalendarUpdate()

'Update screen display in current mode
'Entry  (txtMode) = 0 (Yearly), 1 (Monthly), 2 (Weekly) or 3 (Daily) or 4 (Chart Mode)
'       (txtDate) = Date to be displayed

    Me.Painting = False
    Select Case txtMode
        Case 0                                                                          'if tab 1 (Year) then
            Me.txtCurrentDate = DateSerial(Year(Me.txtDate), Month(Me.txtCurrentDate), Day(Me.txtCurrentDate))                      '<=== ADD THIS LINE
            EnterMonthDates Me.frmCalendarYear, Year(Me.txtDate)                        'and add dates for selected year to form
            ShowYearAppts Me.frmCalendarYear, Me.txtDate, Me.cboCategory                'show appts for month
            If Year(Me.txtDate) = Year(Me.txtCurrentDate) Then                                  'if displayed year = current year then
                HighlightSelectedDate Me.frmCalendarYear, Me.txtCurrentDate, Me.txtCurrentDate  'highlight selected date with black border
            End If
            Me.frmCalendarYear!lstAppts.Requery                                                                                     '<=== ADD THIS LINE
            Me.frmCalendarYear!txtDetails = ""                                                                                      '<=== ADD THIS LINE

        Case 1                                                                          'if tab 1 (Month) then
            Me.txtDate = Me.txtDate - Day(Me.txtDate) + 1                               'force txtDate to 1st day of month
            ShowMonthAppts Me.txtDate, Me.cboCategory                                   'show appts for month
            Me.frmCalendarMonth.Requery                                                 'and refresh subform
        
        Case 2                                                                          'if tab 2 (Week) then
            Me.txtDate = Me.txtDate - Weekday(Me.txtDate, conFirstDay) + 1              'force txtDate to 1st day of week
            ShowWeekAppts Me.txtDate, Me.cboCategory                                    'update weekly appts
            Me.frmCalendarWeek.Requery                                                  'and refresh subform
        
        Case 3                                                                          'if tab 3 (Day) then
            ShowDayAppts Me.txtDate, Me.cboCategory                                     'update daily appts
            Me.frmCalendarDay.Requery                                                   'and refresh subform
        
        Case 4                                                                          'if tab 4 (Year Chart) then
            ShowChart Me.frmCalendarChart, Year(Me.txtDate), Me.cboCategory             'update Chart form
    End Select
    Me.Painting = True

End Sub
Go to the top of the page
 
marinko888
post Apr 11 2019, 12:01 PM
Post#188



Posts: 12
Joined: 9-April 19



Hi Peter,

that has helped me to resolve the issue. Thanks again for all your help! The app is great and I can see that you have put a lot of effort to create it.

Have a good one today...and tomorrow of course! thumbup.gif thanks.gif

Marinko
This post has been edited by marinko888: Apr 11 2019, 12:02 PM
Go to the top of the page
 
marinko888
post Apr 12 2019, 04:07 AM
Post#189



Posts: 12
Joined: 9-April 19



Hi Peter,

is there any way I can use just frmCalendarYear, with all of its functionality and without rest of the forms (and buttons), or it would be impossible to achieve? I have tried but it seems to be a hard task to do due to interconnections with the Parent form.

Thanks,
Marinko
Go to the top of the page
 
Peter Hibbs
post Apr 12 2019, 08:41 AM
Post#190


UtterAccess VIP
Posts: 1,670
Joined: 17-June 10
From: Dorset. UK.


Hi Marinko,

Is there any way I can use just frmCalendarYear, with all of its functionality and without rest of the forms (and buttons).

I guess it is possible but, as you say, it would require quite a bit of work to move some of the controls from the main form to the Yearly form and fix all the references to the other forms and the VBA modules.

There have been several different versions of this calendar and the procedure will probably be different, depending on which version you are using. Can you post a zipped copy of your current version here and I will see what I can do (I think that will be easier than me explaining what you would need to do to get it working). Having said that it would probably be a lot easier to keep the main form - subform design and just remove the Weekly and Daily calendar subforms (and I think it would look better for the users), is there any reason that you need the Yearly form on its own, rather than on a main form?

Peter Hibbs.
Go to the top of the page
 
marinko888
post Apr 12 2019, 09:38 AM
Post#191



Posts: 12
Joined: 9-April 19



Hi Peter,
Thanks for your reply! I would use the frmCalendarYear Form as a subForm for my app (Dairy farm handling). When the user opens up the app it would show the current task list in the Calendar Form, inside the start Form, and the user could make a new task in the Calendar subForm. The frmCalendarYear would come instead of the PieChart.
When the user clicks on the menu icon it would open the full Outlook Style Calendar app.

Attached File  Form.png ( 40.5K )Number of downloads: 10


Any help concerning that is appreciated.

Thanks,
marinko
Go to the top of the page
 
Peter Hibbs
post Apr 13 2019, 05:37 AM
Post#192


UtterAccess VIP
Posts: 1,670
Joined: 17-June 10
From: Dorset. UK.


Hi Marinko,

OK, the Pie Chart looks very good (I think I would keep that if it were me).

I have sent you a Private Message about the facilities you need on the calendar.

Peter.
Go to the top of the page
 
Peter Hibbs
post Apr 15 2019, 08:31 AM
Post#193


UtterAccess VIP
Posts: 1,670
Joined: 17-June 10
From: Dorset. UK.


Hi Marinko,

OK, here is a Year calendar which you can use in your project. Just import the forms, tables, queries and module into your project and then copy the calendar form (frmCalendarYear) on to your main form as a subform and it should work OK (you will need to amend the query qryAppointmentList to add in the main form name to the criteria on columns SD and ED. Something like Forms!YourMainFormName!frmCalendarYear!txtCurrentDate) where YourMainFormName is the name of your parent form.

I don't know which facilities you wanted to keep or remove so you will just have to try it out and see how you get on. You can, of course, change the Category names and colors in the table tblCategories if you need different names and colors for them.

I have also removed some of the fields in the appointments table (tblAppointments) so you may need to do the same if you are using your own table for this data.

Hopefully this will work for you but let me know how you get on.

Peter.
Attached File(s)
Attached File  Outlook_Year_Calendar.zip ( 531.59K )Number of downloads: 11
 
Go to the top of the page
 
marinko888
post Apr 15 2019, 09:10 AM
Post#194



Posts: 12
Joined: 9-April 19



Hi Peter,

thanks for doing that it will for sure improve my app a lot. It has all of the functionality I have pictured myself. I will put it as a subForm due to its necessity.

Thanks again and have a great one today! thanks.gif woohoo.gif

Marinko
Go to the top of the page
 
marinko888
post Apr 15 2019, 12:28 PM
Post#195



Posts: 12
Joined: 9-April 19



Hi Peter,

what do I have to change and where to localize this:

Attached File  Untitled.png ( 4K )Number of downloads: 0


Thanks!
Marinko
Go to the top of the page
 
Peter Hibbs
post Apr 15 2019, 12:45 PM
Post#196


UtterAccess VIP
Posts: 1,670
Joined: 17-June 10
From: Dorset. UK.


Hi,

You should not be getting that message as I removed the 'recurrence' facilities in this new version. You must use the new forms and code I posted for this version to work correctly, it looks like you are using the original forms which will not work.

Peter.
Go to the top of the page
 
marinko888
post Apr 15 2019, 04:20 PM
Post#197



Posts: 12
Joined: 9-April 19



OK. Will do. thumbup.gif

Thanks.
Marinko
Go to the top of the page
 
10 Pages V « < 8 9 10


Custom Search


RSSSearch   Top   Lo-Fi    22nd April 2019 - 09:37 AM