Print Page | Close Window

HELP NEEDED ASAP!!!

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=9092
Printed Date: 23 May 2024 at 11:35am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: HELP NEEDED ASAP!!!
Posted By: moe188
Subject: HELP NEEDED ASAP!!!
Date Posted: 13 December 2007 at 1:25pm

the code bellow was working fime before updating to the latest version. the sub is called once the user hit the <Enter> button.

Private Sub CalendarControl_EventAdded(ByVal EventID As Long)
   
    Dim msg As String
    Dim pEvent As CalendarEvent
   
    Set pEvent = CalendarControl.DataProvider.GetEvent(EventID)
    If Not pEvent Is Nothing Then
        CalendarControl.RedrawControl
        ClientName = pEvent.Subject
        ' call sub to check and see if the client exist in the database or not
        Select Case btnExist
        Case False
            msg = pEvent.Subject & " doese not exist...!"& vbCrLf
            msg = msg & "Add him now to your database ?" & vbCrLf
            If MsgBox(msg, vbYesNo + vbQuestion, Title) = vbYes Then
                'load form to add new client
            Else
                ' delete event
                CalendarControl.DataProvider.DeleteEvent pEvent
            End If
        End Select
    End If
    CalendarControl.Populate
    CalendarControl.DataProvider.ChangeEvent pEvent
    btnExist = False
End Sub
 
now: Private Sub CalendarControl_EventAdded(ByVal EventID As Long) doese not exist anymore.
so how can I fix this problem?
 



Replies:
Posted By: Bernie
Date Posted: 13 December 2007 at 11:59pm
Did you try to use ACTION flag?

-------------
Bernie Ho, Planning Manager + IELTS specialist + part-time programmer
Taiwan, R.O.C


Posted By: moe188
Date Posted: 14 December 2007 at 7:52am
'Action' flag?
can you be a ilittle bit clear in your answer. and like I said, the code was working fine, and no need for 'Action' at all.
thank you,


Posted By: Rafael
Date Posted: 19 December 2007 at 12:04pm
EventAddedEX(ByVal pEvent As XtremeCalendarControl.CalendarEvent) is the event fired after an event is added to the data provider or after CalendarControl_DoCreateEvent


Posted By: sserge
Date Posted: 19 December 2007 at 5:41pm
Yes, an event EventAdded was replaced by EventAddedEx.

However, note that EventAdded is not deleted from library. It is now just hidden, for compatibility reasons. Old versions will still work fine with it.

--
WBR,
Serge


Posted By: moe188
Date Posted: 19 December 2007 at 6:48pm
well,
 if that's the case, why my code it's not working the way it use to be with the old version of calendarcontrol?
do we have to go back to the old version to avoid this problem, or is there any solution?
please advise ASAP!!!!
thank you


Posted By: cmm2006
Date Posted: 21 December 2007 at 4:57pm
I have the same problem too, and I did remove the new version and went back to the old version because I was waiting for someone to answer your question, and it seems like no one want to do so.
good luck.


Posted By: sserge
Date Posted: 21 December 2007 at 5:26pm
Gents, sorry, but simple adding the code above into regular VB sample application works fine with latest version of the control. Of course, with disabling calls for unknown variables like btnExist.

Could you please provide me with some more details on the issue? A sample app, a few screenshots, a description of your environment -- everything will be helpful.

--
WBR,
Serge


Posted By: moe188
Date Posted: 21 December 2007 at 7:10pm
Hi sserge,
sorry about all that, but the btnExist is a boolean variable that I use to check if the client (pEvent.Subject) if it doese exist in the database. if 'True' then the event will be added, otherwise a message will be displayed to the user telling him/her that the name thet they entered it's not in their database. that is the purpose of btnExist.
thank you,
Note: if you have another suggestion, please let us know



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net