Outlook Form - Hidden Label

  • Thread starter Thread starter emurphy
  • Start date Start date
E

emurphy

I am having trouble with a certain Outlook form in Outlook XP on
Windows XP. I have a combobox - combobox 4 - which has two options in
its drop-down box: 1.Referral, 2.Other.

If the user chooses "Referral" from the dropdown box, I want a
previously hidden label --label65--and text box to become visible. Here
is the code I put in for the label as an example, but it is not
working. Can someone tell me what I am doing wrong, please? I am
*really grateful* for any help.

Sub ItemChange()
If
Item.GetInspector.ModifiedFormPages("Message").controls("ComboBox4").value="Referral"
then
Item.GetInspector.ModifiedFormPages("Message").Controls("label65").Visible
= true
End If
End Sub
 
I am having trouble with a certain Outlook form in Outlook XP on
Windows XP. I have a combobox - combobox 4 - which has two options in
its drop-down box: 1.Referral, 2.Other.

If the user chooses "Referral" from the dropdown box, I want a
previously hidden label --label65--and text box to become visible. Here
is the code I put in for the label as an example, but it is not
working. Can someone tell me what I am doing wrong, please? I am
*really grateful* for any help.

Sub ItemChange()
If
Item.GetInspector.ModifiedFormPages("Message").controls("ComboBox4").value="Referral"
then
Item.GetInspector.ModifiedFormPages("Message").Controls("label65").Visible
= true
End If
End Sub

I figured this out from another post. The wording is very specific --
here is what I finally used:

Sub Item_CustomPropertyChange (ByVal Name)
Select Case Name
Case "fldSourceOfBusiness"
If Item.userProperties.Find("fldSourceOfBusiness").Value = "Referral"
then
Item.GetInspector.ModifiedFormPages("Message").Controls("label65").Visible
= 1
End If
End Select
End Sub
 
Back
Top