By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,635 Members | 917 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,635 IT Pros & Developers. It's quick & easy.

How to enable/disable button control

benchpolo
100+
P: 142
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
Share this Question
Share on Google+
3 Replies


dsatino
100+
P: 393
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
100+
P: 142
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

P: 85
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

Post your reply

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