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

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 11221
on the Load event of the form:
me.control1.visible = false
me.control2.visible = false
etc...

on the AfterUpdate event of the list box:
me.control1.visible = true
me.control2.visible = 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.visible = false
me.control2.visible = false
etc...

on the AfterUpdate event of the list box:
me.control1.visible = true
me.control2.visible = 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
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){...
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...
3
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)...
2
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...
1
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...
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...
3
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...
2
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...
3
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 ...
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?
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.