473,388 Members | 1,496 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,388 software developers and data experts.

How to enable/disable button control

benchpolo
142 100+
I have 2 button control ADD and EDIT and referencing a Data Entry form. Within the Data Entry form there are buttons ADD. I want to disable the ADD button when the EDIT button is selected in the main menu. I don't want the client adding records on EDIT mode of the Data Entry form. Make sense?

Thanks.
Jun 5 '12 #1
3 7155
dsatino
393 256MB
set the openargs property of the form to true/false depending on which button is pushed.

In the open event of the form, set the enabled property of the button to the openarg value
Jun 5 '12 #2
benchpolo
142 100+
The button is in another form (MAIN) and I want to disable it on form load when the other form loads.
Jun 5 '12 #3
Mudassir
85 64KB
when you click on edit button it redirects you to another page where there is button of Add, so you need to take a session variable and on page load on next page on which add button is there, check the session , and if the session is not null, set the btnAdd.Enabaled=false;
chill
Jun 6 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Suni | last post by:
Hi everybody, But what I am trying to do is like, there are 2 forms, and if I click on the button in form1, it'll open up form2 and disable the button in form1. Then when I click on the button in...
6
by: M O J O | last post by:
Hi, I have a webform with a textbox and a button. When the textbox is empty (=""), I want the button to be disabled. When the user enters text in the textbox, the button must be enabled. Is...
2
by: bartlomiej.szafraniec | last post by:
Hi! I'm trying to implement custom button. But I don't want to extend Button class. I want to extend Control class. I want to implement Enable disable functionality. But unfortunatly when...
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...
0
by: ArmyGeek | last post by:
Hey Guys, Im trying to figure out how to Disable a Button after a user clicks it, then Enable the Button if the user emptys a Text Box where the user can input information. I also want to...
2
by: ArmyGeek | last post by:
Hey Guys, Im trying to figure out how to Disable a Button after a user clicks it, then Enable the Button if the user emptys a Text Box where the user can input information. I also want to...
6
by: mikaeri | last post by:
Hello everyone, I have two different tables:Products&Variations. One of them is for product characteristics and the other is for keeping the track of any variations made on proucts. I have a...
5
by: zonar00 | last post by:
Im using two forms. On form 1 i decides to open the specific form(form 2) i disables the button which is present in form 1 by changing its property to btn.Enabled=false; When i open the second...
3
by: Donald A. Fisher | last post by:
Hello. I've been working a vb project and have a form with a button on it that performs some actions after disabling the button when clicked: Code disabling button and starting actions: Private...
2
by: maheshprof | last post by:
hi , how to enable a button when i enter a text in a textbox.and also it should be disabled initially after user types a text in the textbox it should enable
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.