GeekGirlau
Programmer
I have a custom form that uses the CustomPropertyChange event to hide or display different controls each time the value is changed within a list box. Sample of the code appears below:
Sub Item_CustomPropertyChange(ByVal Name)
Select Case Name
Case "ServiceLevel"
Set myPages = Item.GetInspector.ModifiedFormPages
Select Case Item.UserProperties("ServiceLevel".Value
Case "Level 1"
myPages("Message".Controls("txtLevel1".Visible=True
myPages("Message".Controls("chkLevel1_1".Visible=True
...
Case "Level 1+"
...
Case "Level 2"
...
End Select
End Select
End Sub
The code runs perfectly if I use the "Run this form" option from Design View within Outlook. However if I open the form from Explorer or launch it via MS Access, the code doesn't run.
HELP!!!
Sub Item_CustomPropertyChange(ByVal Name)
Select Case Name
Case "ServiceLevel"
Set myPages = Item.GetInspector.ModifiedFormPages
Select Case Item.UserProperties("ServiceLevel".Value
Case "Level 1"
myPages("Message".Controls("txtLevel1".Visible=True
myPages("Message".Controls("chkLevel1_1".Visible=True
...
Case "Level 1+"
...
Case "Level 2"
...
End Select
End Select
End Sub
The code runs perfectly if I use the "Run this form" option from Design View within Outlook. However if I open the form from Explorer or launch it via MS Access, the code doesn't run.
HELP!!!