473,856 Members | 1,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Enable/Disable Control Buttons

Hi

I have a number of control buttons and tabs on a main form which I
would like to be disabled until a selection is made in a list box,
after which the controls would be enabled. All of the controls display
data or run reports which require a parameter which is passed to the
underlying queries from aforementioned list box.....I would be
gratefull if someone had a tidy way of achieving this..

Thanks
Steve

Jul 26 '06 #1
2 11244
on the Load event of the form:
me.control1.vis ible = false
me.control2.vis ible = false
etc...

on the AfterUpdate event of the list box:
me.control1.vis ible = true
me.control2.vis ible = true
etc..

You could also use "enabled" rather than "visible" if you'ld rather do
that, but I think it looks a little slicker to have them appear and
disappear.

Steve_s wrote:
Hi

I have a number of control buttons and tabs on a main form which I
would like to be disabled until a selection is made in a list box,
after which the controls would be enabled. All of the controls display
data or run reports which require a parameter which is passed to the
underlying queries from aforementioned list box.....I would be
gratefull if someone had a tidy way of achieving this..

Thanks
Steve
Jul 26 '06 #2
Thanks very much...works very well with command buttons though the tab
controls can still be selected if I use the enabled option, though the
actual list boxes etc on the tab are dimmed out...So I have used
enabled for controls on the main form and visible for the tabs...looks
very effective!
Thanks again

Steve
ManningFan wrote:
on the Load event of the form:
me.control1.vis ible = false
me.control2.vis ible = false
etc...

on the AfterUpdate event of the list box:
me.control1.vis ible = true
me.control2.vis ible = true
etc..

You could also use "enabled" rather than "visible" if you'ld rather do
that, but I think it looks a little slicker to have them appear and
disappear.

Steve_s wrote:
Hi

I have a number of control buttons and tabs on a main form which I
would like to be disabled until a selection is made in a list box,
after which the controls would be enabled. All of the controls display
data or run reports which require a parameter which is passed to the
underlying queries from aforementioned list box.....I would be
gratefull if someone had a tidy way of achieving this..

Thanks
Steve
Jul 27 '06 #3

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

Similar topics

3
9213
by: Bob Bedford | last post by:
I've this code: function checkdate(FormSubmit){ alert(document.getElementById('Mois').value); if(eval(document.getElementById('Mois'))>0 && eval(document.getElementById('Annee'))>0){ document.forms.getElementByID('SELECTCONSTRUCTOR').disabled = false; //can't reach the control here } else
1
4261
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 is selected - enable a field to use the M$ Datepicker. Using the code below works for most of our fields, however the problem is that when the field is re-enabled - it remembers the original date or data prior to it being disabled - despite the...
3
3805
by: DBQueen | last post by:
I have a form with lines of controls. On some of the lines there are 3 controls (call them A,B,C); other lines have only control A. The controls have been numbered sequentially (Q20, Q21....Q76) and they were put onto the form in the numerical sequence. I have given the A's with B & C's on the same line a tag=1; B.tag=2, C,tag=2) I am trying to write 2 modules so that the following occurs (on Form_Current and 'A' Control_Before or...
2
8673
by: Dntc | last post by:
Hi All Is there anyway to enable/disable the toolbar buttons on the fly as like in MFC which helps centralizing this process?Let's i have a toolbar button ToolbarButtonSave which can be enabled/disabled inside the Edit control TextChanged event handler?I'm looking for a way which Toolbar can ask itself to enable/disable its buttons as ON_UPDATE_COMMAND_UI in MFC?
1
2073
by: inadsad | last post by:
Good Day, I have 2 forms with bindingNavigator and have a simple routine to enable/disable navigator buttons. Each nav button is assigned to a tag value. The problem is that if I want to enable/disable multiple nav buttons I have to call the routine twice. EnableDisableNavBtn(NavMain, NavMain.Item(1), false) EnableDisableNavBtn(NavMain, NavMain.Item(2), false) ...
6
5563
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 enabled only if something is selected in the listview. That part specifically works but not very well. It seems that I can only get the buttons to disable if I click off the text of the items in the listview but still within about 10-20 pixels of...
3
11670
by: Pietro | last post by:
Hi all, First of all I'd like to thank you very very much ,as finally after many years of searching,I could find a code to disable/enable the shift key,but actually i cannot use the code as I'm very new to VBA,i tried to follow the instructions reported in the code,but i got no result,i still can use the shift key,can you explain in details how to use it correctly to enable/disable users from pressing shift key to view database windw?,the...
2
2049
by: iDesmet | last post by:
Hallo, First of all, I'm new at this group and I'm currently learning VB.NET by my own (later I want to learn C#, but that's another story). In other words, I'm a Newbie. Anyway, I was wondering if someone is so kind to tell me how to enable or disable some buttons when a MdiChild Window is opened. For example, I have the Main Mdi Window opened, then I click in a
3
7955
by: =?Utf-8?B?UGxhdGVyaW90?= | last post by:
I have link buttons in a Gridview that, depending on the value in another column (Not the Key column) will need to be disabled. For example, (Column2 has link buttons) Column1 Column2 Books 54 Videos 6 Audio 3
0
9762
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10696
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9531
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7932
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5761
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5958
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4575
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4174
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3201
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.