Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabling a Field in Outlook

Status
Not open for further replies.

TalosBlack

Programmer
Jan 6, 2004
33
0
0
US
I use the following code to disable/enable a field in Outlook. The problem is the field starts as enabled no matter what i do. I would like for the field to start disabled and only enable when the checkbox is marked.

Sub CheckBox1_Click()
Set CheckBox1 = Item.GetInspector.ModifiedFormPages("Data").Controls("CheckBox1")
Set TextBox2 = Item.GetInspector.ModifiedFormPages("Data").Controls("TextBox2")
Set TextBox14 = Item.GetInspector.ModifiedFormPages("Data").Controls("TextBox14")

If CheckBox1=False Then
TextBox2.Enabled=False
TextBox14.Enabled=False

Else
TextBox2.Enabled=True
TextBox14.Enabled=True
End If
End Sub

Thanks

John
 
Sub Item_Open 'runs when form opens
'Declarations
Set ComboBox1 = Item.GetInspector.ModifiedFormPages("Data").Controls("ComboBox1")

'Drop down menu assignment
ComboBox1.PossibleValues = "Red;Green;Blue;Other"

'Declarations
Set TextBox15 = Item.GetInspector.ModifiedFormPages("Data").Controls("TextBox15")

'Intializing Invisibility
'Text box invisible
TextBox15.Visible = False

End Sub

Sub ComboBox1_Click() 'does only on a mouse click

'Intialization
Set ComboBox1 = Item.GetInspector.ModifiedFormPages("Data").Controls("ComboBox1")
Set TextBox15 = Item.GetInspector.ModifiedFormPages("Data").Controls("TextBox15")
If ComboBox1.Text = "Other" Then
TextBox15.Visible=True
Else
TextBox15.Visible=False
End If
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top