stwaltemyer
Member
Hello and good evening!
On my form I have one checkbox ("CheckBox5") with value "Setup Required" in a yes/no format. I then have a frame ("setupNEEDS1") with other checkboxes and textboxes inside. The frame "setupNEEDS1" starts invisible, and with the code below it becomes visible upon clicking "CheckBox5", and invisible again if I click the checkbox again. The code works when I am designing and testing, but it does not work on the published form in a calendar for meetings.
I've chosen to use the CustomPropertyChange event because I've read (i.e. this link) that by using that function, any changes that I make should save when I use the form to schedule meetings.
My code looks like this, and while I design and test the form, it works perfectly:
Sub Item_CustomPropertyChange(ByVal myPropName)
Select Case myPropName
Case "Setup Required"
Set myPages = Item.GetInspector.ModifiedFormPages
Set myCtrl1 = myPages("Form").Controls("setupNEEDS1")
set myBox = myPages("Form").Controls("CheckBox5")
If Item.UserProperties("Setup Required").Value Then
myCtrl1.Visible = True
Else
myCtrl1.Visible = False
End If
Case Else
End Select
End Sub
While designing the form in Outlook Developer mode, the code works exactly as I want it to. My problem is that when I publish the form to my Public Calendar, the visible/invisible functionality does not work, while everything else works. This is my first attempt working with custom properties, so I imagine that could be the case.
But then I still don't know why it's not arriving at the published end.
Can anyone see where I'm going wrong? Thank you so much!!!
P.S. I've got to thank the anonymous author of this page for the source of the code.
On my form I have one checkbox ("CheckBox5") with value "Setup Required" in a yes/no format. I then have a frame ("setupNEEDS1") with other checkboxes and textboxes inside. The frame "setupNEEDS1" starts invisible, and with the code below it becomes visible upon clicking "CheckBox5", and invisible again if I click the checkbox again. The code works when I am designing and testing, but it does not work on the published form in a calendar for meetings.
I've chosen to use the CustomPropertyChange event because I've read (i.e. this link) that by using that function, any changes that I make should save when I use the form to schedule meetings.
My code looks like this, and while I design and test the form, it works perfectly:
Sub Item_CustomPropertyChange(ByVal myPropName)
Select Case myPropName
Case "Setup Required"
Set myPages = Item.GetInspector.ModifiedFormPages
Set myCtrl1 = myPages("Form").Controls("setupNEEDS1")
set myBox = myPages("Form").Controls("CheckBox5")
If Item.UserProperties("Setup Required").Value Then
myCtrl1.Visible = True
Else
myCtrl1.Visible = False
End If
Case Else
End Select
End Sub
While designing the form in Outlook Developer mode, the code works exactly as I want it to. My problem is that when I publish the form to my Public Calendar, the visible/invisible functionality does not work, while everything else works. This is my first attempt working with custom properties, so I imagine that could be the case.
But then I still don't know why it's not arriving at the published end.
Can anyone see where I'm going wrong? Thank you so much!!!
P.S. I've got to thank the anonymous author of this page for the source of the code.