You're close.
If you want this text box to show or hide based on a change to a value on a
form, you'll need to use the Custom Property Change event.
Sub Item_CustomPropertyChange (ByVal Name)
Select Case Name
Case "NameOfField"
If Item.userProperties.Find("NameOfField").Value = "X" then
Item.ModifiedFormPages("PageName").Controls("ControlName").Visible = 0
End If
End Select
End Sub
This sub is pretty strict about how it's configured. Don't change the word
Name in the opening line of the sub or the opening line of the Select Case
statement.

Signature
Patricia Cardoza
Outlook MVP
Author - Special Edition Using Microsoft Office Outlook 2003
Lead Author - Access 2003 VBA Programmer's Reference
Author - Absolute Beginner's Guide to Microsoft OneNote 2003
http://blogs.officezealot.com/cardoza
> Hello All,
>
[quoted text clipped - 11 lines]
>
> Blue
Blue - 28 Jun 2004 19:41 GMT
Patricia thank you for the reply...Over the weekend, after trying many different things I got this to work a different way than you did (On Outlook 2000, but for some reason 2003 it didn't work)...The way I used is below:
Dim txtSpecial
Dim txtHowMany
Dim mobjOptButControls
Function Item_Open()
Dim objInsp
Set objInsp = Item.GetInspector
' set controls collection(s) and unbound text boxes
Set mobjOptButControls = objInsp.ModifiedFormPages("Message").Controls
Set txtSpecial = mobjOptButControls("txtSpecial")
Set txtHowMany = mobjOptButControls("txtHowMany")
Set objInsp = Nothing
End Function
Sub optSpecial1_Click()
txtSpecial.Visible = True
mobjOptButControls("txtSpecial").Text = ""
End Sub
Sub OptSpecial2_Click()
txtSpecial.Visible = False
End Sub
Sub optExtra1_Click()
txtHowMany.Visible = True
mobjOptButControls("txtHowMany").Text = ""
End Sub
Sub optExtra2_Click()
txtHowMany.Visible = False
End Sub
Do you have any idea why the above code isn't working in Outlook 2003? Also the code you posted...I was reading somewhere that you only have to use PropertyChange when a control is connect to a database...Is there any truth to that?
> You're close.
>
[quoted text clipped - 32 lines]
> >
> > Blue