HELP NEEDED ASAP!!! |
Post Reply |
Author | |
moe188
Senior Member Joined: 27 March 2006 Status: Offline Points: 220 |
Post Options
Thanks(0)
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?
|
|
Bernie
Senior Member Joined: 05 July 2007 Location: Taiwan Status: Offline Points: 109 |
Post Options
Thanks(0)
|
Did you try to use ACTION flag?
|
|
Bernie Ho, Planning Manager + IELTS specialist + part-time programmer
Taiwan, R.O.C |
|
moe188
Senior Member Joined: 27 March 2006 Status: Offline Points: 220 |
Post Options
Thanks(0)
|
'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,
|
|
Rafael
Newbie Joined: 26 November 2007 Location: United States Status: Offline Points: 28 |
Post Options
Thanks(0)
|
EventAddedEX(ByVal pEvent As XtremeCalendarControl.CalendarEvent) is the event fired after an event is added to the data provider or after CalendarControl_DoCreateEvent
|
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
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 |
|
moe188
Senior Member Joined: 27 March 2006 Status: Offline Points: 220 |
Post Options
Thanks(0)
|
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
|
|
cmm2006
Senior Member Joined: 26 September 2006 Status: Offline Points: 118 |
Post Options
Thanks(0)
|
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.
|
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
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 |
|
moe188
Senior Member Joined: 27 March 2006 Status: Offline Points: 220 |
Post Options
Thanks(0)
|
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
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |