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

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
17 Pages V « < 15 16 17  (Go to first unread post)
   Reply to this topicStart new topic
> Ms Outlook Style Calendar For Access Projects, Access 2003    
 
   
zcarloslopes
post Mar 10 2020, 03:36 AM
Post#321



Posts: 34
Joined: 7-February 19



Hi Peter!

you are correct. I was testing on my project when I detected the error...

however the final version has the condition for each quadrant, when vQuad > 4 set vQuad = 1 and MsgBox warning that the searched appointment cannot be shown in any quadrant of the monthly calendar, pop-up form shows them all.

In my project, as the font is very small, i put a autoclose MsgBox showing the contents of each quadrant on right mouse click (cause on MouseMove does not work in continuous form).

Now I'm working on a way to show the new style calendar in a report.

I am really grateful for your help.

Carlos
Go to the top of the page
 
zcarloslopes
post Mar 16 2020, 07:48 AM
Post#322



Posts: 34
Joined: 7-February 19



Hi Peter!

I made some changes in month calendar and I think I have overcome the A2003 limitations. So I attach the file below, cause I would like to know your opinion about that..

Changes:

I added some fields to the table "tblMonthData".

I added some "DayData" and "DayColor" fields to the form "frmCalendarMonth".

I put all the "DayData" and "DayColor" with the transparent background.

I ordered "Bring to Front" and "Send to Back" facilities for each control.

I added some code in the function "ShowMonthAppts" to update text boxes and update color boxes.

I removed the color changing functionality when a Date get focus (I have not found a solution to maintain this functionality).

what do you think about?



P.S. at the moment I would like to ask your help for a last update if it is possible..

when a user deletes an appointment, i need that the quadrants numbers of the remaining appointment of the same day were updated...

for example:
on the same day I have 3 appointments: appointment 1 --> Quad 1; appointment 2 --> Quad 2 and appointment 3 --> Quad 3

if the user deletes the appointment 2, should remain appointment 1 --> Quad 1; appointment 3 --> Quad 2

Thank you for everything and sorry for my countless requests for help..

Carlos


Attached File(s)
Attached File  Outlook_Style_Calendar_v5.zip ( 372.42K )Number of downloads: 24
 
Go to the top of the page
 
Peter Hibbs
post Mar 17 2020, 07:18 AM
Post#323


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


Hi Carlos,

OK try this -

In form frmCalendarAppt add the new Sub-routine below.

CODE
Public Sub TidyQuads(vDate As Date)

'Rearrange Quad values for specified date if any gaps in sequence
'Entry  (vDate) = Date of appointment to check
'Exit   (Quad field in Appointment records updated)

Dim rst As Recordset
Dim vQuadNo As Long

    vQuadNo = 1
    Set rst = CurrentDb.OpenRecordset("SELECT * FROM tblAppointments WHERE DateValue(ApptStart) = " & SQLDate(DateValue(vDate)) & " ORDER BY Quad")
    Do Until rst.EOF
        rst.Edit
        rst!Quad = vQuadNo
        rst.Update
        vQuadNo = vQuadNo + 1
        rst.MoveNext
    Loop
    rst.Close
    Set rst = Nothing

End Sub


In the same form, find the Private Sub cmdDelete_Click() event code and modify the code to this :-

CODE
Private Sub cmdDelete_Click()

'Delete selected appointment record

Dim vDate As Date
Dim rst As Recordset

    If Nz(Me.txtPattern) <> "" And Me.chkRecurSingle = True Then                                                                                'if recurring appt and sequence mode then
        If MsgBox("Are you sure you want to delete this appointment and ALL the associated recurring appointments?", vbQuestion + vbYesNo, "Delete Recurring Appointments") = vbNo Then Exit Sub
        Set rst = CurrentDb.OpenRecordset("SELECT ApptID, ApptStart, RecurrenceID FROM tblAppointments WHERE RecurrenceID = " & Me.lstAppts.Column(9))  'fetch all dates in recurring appt
        Do Until rst.EOF
            vDate = DateValue(rst!ApptStart)                                                                                                    'fetch appt date to tidy up
            CurrentDb.Execute "DELETE FROM tblAppointments WHERE ApptID = " & rst!ApptID                                                        'delete recurring appt record for this date
            TidyQuads vDate                                                                                                                     'tidy up all appts on this date
           rst.MoveNext                                                                                                                         'get next appt date in recurring sequence
        Loop
        rst.Close
        Set rst = Nothing
    Else
        If MsgBox("Are you sure you want to delete this appointment?", vbQuestion + vbYesNo, "Delete Appointment") = vbNo Then Exit Sub         'request confirmation
        vDate = DLookup("DateValue(ApptStart)", "tblAppointments", "ApptID = " & Me.txtAppointmentID)
        CurrentDb.Execute "DELETE FROM tblAppointments WHERE ApptID = " & Me.txtAppointmentID                                                   'delete session record
        TidyQuads vDate
    End If
    gDummy = 1                                                                                                                                  'return 1 (refresh screen on return)
    DoCmd.Close acForm, Me.Name                                                                                                                 'and close form

End Sub


Basically what this does is that whenever an appointment is deleted, this bit of code deletes the selected appointment record (as before) but before it is deleted it updates the Quad field of any other appointments for that date so that they always start at 1. Hopefully this will do what you want.

Also, I think the extra code that you added to the display routine is not quite right as it sometimes seems to show the same appointment twice on the calendar but I will leave you to fix that since you know what changes you made.

Good luck,

Peter.


Go to the top of the page
 
zcarloslopes
post Mar 17 2020, 11:07 AM
Post#324



Posts: 34
Joined: 7-February 19



Hi Peter!

thanks again for the help..

by the first tests it is exactly what I intended...

I also made some corrections in the function "ShowMonthAppts", and now i thing it don't show the same appointment twice on the calendar..

I leave a file with the updates..

Thanks!

Carlos


Attached File(s)
Attached File  Outlook_Style_Calendar_v6.zip ( 372.72K )Number of downloads: 102
 
Go to the top of the page
 
Peter Hibbs
post Mar 17 2020, 11:45 AM
Post#325


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


Hi Carlos,

OK, very good and thanks for the latest version.

And good luck with the project,

Peter.
Go to the top of the page
 
Spicepradeep
post May 6 2020, 02:23 AM
Post#326



Posts: 2
Joined: 4-May 20



Hi

I downloaded the file but it doesn't open as intended.
I'm using windows 10 on a 64 bit system and am receiving the attached messages.

Could someone point me in the correct direction please?


Thanks in advance

Pradeep
Attached File(s)
Attached File  Screenshot_2.png ( 84.37K )Number of downloads: 14
Attached File  Screenshot_1.png ( 10.48K )Number of downloads: 5
 
Go to the top of the page
 
Peter Hibbs
post May 6 2020, 03:46 AM
Post#327


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


Hi Pradeep,

As you are using the 64 bit version of Access you need to change the Declare statement slightly. Have a look at these sites which should help -

Declare Statement for 64 bits

and

Compiler Directives

or you could just try this :-

CODE
#If VBA7 Then                                           'use PtrSafe & LongPtr
    Private Declare PtrSafe Function ChooseColor Lib "comdlg32.dll" Alias "ChooseColorA" (pChoosecolor As COLORSTRUC) As Long
#Else
    Private Declare Function ChooseColor Lib "comdlg32.dll" Alias "ChooseColorA" (pChoosecolor As COLORSTRUC) As Long
#End If


Peter Hibbs.
Go to the top of the page
 
Spicepradeep
post May 7 2020, 04:24 AM
Post#328



Posts: 2
Joined: 4-May 20



Hi Pete

Thank you very much for that

Pradeep
Go to the top of the page
 
kundepuu
post Jun 19 2020, 02:12 AM
Post#329



Posts: 4
Joined: 11-May 20



Hello,
Is it possible to select in same time multiple items from list and add those into one appointment?
Attached File  Multi_select.png ( 77.12K )Number of downloads: 10

This post has been edited by kundepuu: Jun 19 2020, 02:13 AM
Go to the top of the page
 
Peter Hibbs
post Jun 19 2020, 04:57 PM
Post#330


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


Hi kundepuu,

welcome2UA.gif

Sorry, but with the current design it is not possible to have multiple categories for a single appointment and I don't really understand why you would want to anyway. What would be the purpose in marking an appointment with two (or more) categories?

Perhaps if you could explain what you are trying to do then I might be able to offer some alternative option (maybe).

Peter Hibbs.
Go to the top of the page
 
kundepuu
post Jun 19 2020, 10:39 PM
Post#331



Posts: 4
Joined: 11-May 20



Let say I have 4 main groups and those all have sub workers.

Example
I want to make appointment for group1(let say it have 6 sub workers)..
At moment I can do those workers appointments separately. Let say that A 6-10, C 6-14 D 14-20 and F 10-24 If I do like this many appointments need to add...
I think if I can select for listbox multiple workers works better and those names and times can write into info box and maybe program ask new name for this appointment that shows in calendar (and not have overlay problem) ?
Or it is possible then make two cascading comboboxs/listboxs there the first one I can select main group and the second one controls workers?
Those workers names can put into notes box and main group works like now?
Hopely this make sense.
Go to the top of the page
 
Peter Hibbs
post Jun 21 2020, 03:57 PM
Post#332


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


Hi kundepuu,

Sorry, I am not sure if it possible to do what you want. It sounds like you should have another table for the sub-workers which is linked to the appointments table but without seeing you code, I can't really be sure.

I don't think I can really help you any further with this but good luck anyway.

Peter.
Go to the top of the page
 
17 Pages V « < 15 16 17


Custom Search


RSSSearch   Top   Lo-Fi    2nd July 2020 - 10:43 AM