Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Bug in CustomProperties?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Bug in CustomProperties?

 Post Reply Post Reply
Author
Message
chris3105 View Drop Down
Newbie
Newbie


Joined: 03 March 2010
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote chris3105 Quote  Post ReplyReply Direct Link To This Post Topic: Bug in CustomProperties?
    Posted: 10 March 2010 at 3:34pm
Hello,
 
I wrote a little procedure for inserting/updating custom properties, and it seems, that there's a bug. Any help would be nice.
 
 
Code:
 
Private ModifiedEvent As CalendarEvent
Private m_pCalendar As CalendarControl
 
Private sub SaveProp()
 
    Dim I As Long
    Dim propName
    Dim propVal
   
    ModifiedEvent.CustomProperties.RemoveAll
   
    For I = 1 To 5
       propName = Trim(Me("editPropName" & I))
      If Len(propName & "") > 0 Then
         propVal = Me("editPropValue" & I)
          ModifiedEvent.CustomProperties.Property(propName) = propVal
          Debug.Print "Save as: ", propName, propVal
        End If
    Next
 
    For Each propName In ModifiedEvent.CustomProperties
        If Len(propName & "") > 0 Then
            Debug.Print "Saved as: ", propName, ModifiedEvent.CustomProperties(propName)
         End If
    Next
   
    Set m_pCalendar = Forms!frmkalender.g_pEditEvenArgs.m_pCalendar
    m_pCalendar.DataProvider.ChangeEvent ModifiedEvent
 
end sub
 
Output Debug1:
Save as:      zeile1        wert1
Save as:      zeile2        wert2
Save as:      zeile3        wert3
 
Output Debug2:
Saved as:     zeile1        wert3
Saved as:     zeile2        wert3
Saved as:     zeile3        wert3
 
Value of field CustomPropertiesXMLDate in table Event:
<Calendar CompactMode="1" Locale="1049"><CustomProperties><CustomProperty Name="zeile1" Value="wert3" VariantType="16396"/><CustomProperty Name="zeile2" Value="wert3" VariantType="16396"/><CustomProperty Name="zeile3" Value="wert3" VariantType="16396"/></CustomProperties></Calendar>
 
 
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 20 April 2010 at 1:43pm
In Access you must tell it what type of variable you are passing. For example:

 Dim propName As String
 Dim propVal As String

I just tried this in Access and it works fine one you tell it what type.  
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.