
Custom Property changes in Custom Outlook Form
Hi there,
I'm trying to create a custom Outlook form that will throw
up a message box when the user chooses one option from a
drop down list.
I have tried the suggested method (from slipstick.com) of
using a case statement, but can't get it to work at all...
I have also tried doing a Conditional statement - and this
works to some degree...I get the correct message boxes
when I change the custom property - but if I change any of
the custom properties on the same page I get one of the
message boxes displaying again!
I've tried referring to the custom property using the
field name and also using the name of the combobox - but
neither works.
I have been playing around with a wee test form with two
combo boxes - here's the code I've been trying:
'Sub Item_CustomPropertyChange(ByVal cb1)
'Set MyPage=Item.GetInspector.ModifiedFormPages("Message")
'fieldchange = MyPage.cb1.Value
'If fieldchange = "No" then
' MsgBox "No sir I don't think so"
'Else
' MsgBox "Yup yup yup"
'End if
'End Sub
Sub Item_CustomPropertyChange(ByVal fieldselect)
Set MyPage=Item.GetInspector.ModifiedFormPages("Message")
fieldchange = MyPage.fieldselect.Value
Select case fieldselect
Case "No"
MsgBox "No sir I don't think so"
Case "Yes"
MsgBox "Yup yup yup"
End Select
End Sub
The combobox I want to monitor's name is "cb1", and its
field name is "fieldselect" - so you can see that I have
tried both.....anyone with any ideas will be onto a penny
caramel!!!
Cheers!
Lor