A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Enabled/Disabled text boxes



 
 
Thread Tools Display Modes
  #1  
Old August 12th, 2004, 10:49 PM
Marc
external usenet poster
 
Posts: n/a
Default Enabled/Disabled text boxes

Hi,

Is it possible to make a text box in a form enabled or
disabled depending on what choice is made in a combo box
on the form?

I am in Access 2000.

Thanks,

Marc
  #2  
Old August 12th, 2004, 11:27 PM
Reggie
external usenet poster
 
Posts: n/a
Default Enabled/Disabled text boxes

Marc, sure is. In the afterupdate event of the combobox just do something like

Private Sub cboMyComboBox_AfterUpdate()
If Me.cboMyCombo = "this" Then
Me.myTextBox.Enabled = False
Else
Me.myTextBox.Enabled = True
End If
End Sub

Note: If the textbox is located on a subform you will have to refrence it like so:

Me.MySubform.Form.myTextBox.Enabled=False

Hope it helps!
--
Reggie

----------
"Marc" wrote in message
...
Hi,

Is it possible to make a text box in a form enabled or
disabled depending on what choice is made in a combo box
on the form?

I am in Access 2000.

Thanks,

Marc



  #3  
Old August 12th, 2004, 11:46 PM
Marc
external usenet poster
 
Posts: n/a
Default Enabled/Disabled text boxes

Thanks Reggie!

Marc

-----Original Message-----
Marc, sure is. In the afterupdate event of the combobox

just do something like

Private Sub cboMyComboBox_AfterUpdate()
If Me.cboMyCombo = "this" Then
Me.myTextBox.Enabled = False
Else
Me.myTextBox.Enabled = True
End If
End Sub

Note: If the textbox is located on a subform you will

have to refrence it like so:

Me.MySubform.Form.myTextBox.Enabled=False

Hope it helps!
--
Reggie

----------
"Marc" wrote in

message
...
Hi,

Is it possible to make a text box in a form enabled or
disabled depending on what choice is made in a combo box
on the form?

I am in Access 2000.

Thanks,

Marc



.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Text Boxes Jyarus Powerpoint 2 July 4th, 2004 07:52 PM
moving text boxes lin Using Forms 1 June 12th, 2004 12:26 AM
Auto - Update of text boxes with page numbers problem Don Visio 0 April 27th, 2004 05:15 PM
Printing Text Boxes with a chart Jon Peltier Charts and Charting 1 January 12th, 2004 02:51 PM
Graphic with text boxes Bourbon Charts and Charting 1 January 9th, 2004 05:22 PM


All times are GMT +1. The time now is 03:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.