473,408 Members | 1,826 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Enable / Disable text box

Hi all,
I have a check box and a text box.
incase of the checkbox is checked i want the text box to be disabled.
i wrote as followed:

If cbxNewPc.Checked = True Then
tbxOldSerial.Enabled = False
End If

Works like magic.
But, what happens if the user uncheck the checkbox...how do i re-
enable the text box?

Thanks,
50

May 7 '07 #1
2 17407
On May 7, 9:08 pm, 5070...@gmail.com wrote:
Hi all,
I have a check box and a text box.
incase of the checkbox is checked i want the text box to be disabled.
i wrote as followed:

If cbxNewPc.Checked = True Then
tbxOldSerial.Enabled = False
End If

Works like magic.
But, what happens if the user uncheck the checkbox...how do i re-
enable the text box?

Thanks,
50
Welp, i figured that "Brainer" alone :)
Cheers everyone!

May 7 '07 #2
Next time, just try:

tbxOldSerial.Enabled = cbxNewPc.Checked

in your cbxNewPc CheckedChanged event.

Much easier.

Cheers,
Johnny J.

<50*****@gmail.comwrote in message
news:11**********************@l77g2000hsb.googlegr oups.com...
Hi all,
I have a check box and a text box.
incase of the checkbox is checked i want the text box to be disabled.
i wrote as followed:

If cbxNewPc.Checked = True Then
tbxOldSerial.Enabled = False
End If

Works like magic.
But, what happens if the user uncheck the checkbox...how do i re-
enable the text box?

Thanks,
50

May 8 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: HolaGoogle | last post by:
Hi all, Can you please tell me what's wrong with my code??? i do have this database in wich i have to field.One is a "yes/no" field and another one is "number" field. To display the yes/no field...
2
by: HolaGoogle | last post by:
Can you please tell me the right way to do this?? it's realy important! thanks in advance... Hi all, Can you please tell me what's wrong with my code??? i do have this database in wich i have...
1
by: hortoristic | last post by:
We are using JavaScript to Enable/Disable certain fields on web pages based on business rules. A simple example is if when using an option type tag, and the two options are Yes and No. If YES...
6
by: Lloyd | last post by:
How do you make a textbox enabled or disabled ??? i have tried Textbox.disable or enable but the controls apparently dont have this property programmically ???
2
by: rn5a | last post by:
In a shopping cart app, assume that a user has placed 4 orders (each order has a corresponding OrderID which will be unique). When he comes to MyCart.aspx, by default, the details of his last order...
1
by: scanreg | last post by:
My form needs to (1) direct to specified URLs based on a combination of form selections and (2) enable/disable form features based on selections within the form FORM Radio 1 - A - B - C ...
6
by: Brandon McCombs | last post by:
Hello, I have a form that contains a listview on the left side and a column of buttons on the right side. Only some of the buttons do I want enabled all the time. The other buttons should be...
2
by: Naushad | last post by:
Hi all, I am using the countinous form. I want to Enable/Disable the some fields for perticular records as per the following condition when open the form. I have written this code in "On Current...
8
by: alamodgal | last post by:
hiiiiiiiiiii everybody, pls solve my problem if u can? Actualy what happens in my site when i press enter key it will show some secured...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.