473,401 Members | 2,127 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,401 software developers and data experts.

Change Event ComboBox

Hi, I have a simple question about setting the value of a variable from a ComboBox. I'm sure this is easy to do, but I can't think of a way right now.

I have an unbound Form with around 10 ComboBoxes, and I want to set the boolean variable bDirty to True when any on the ComboBoxe values are changed. If the Form was Bound this would be no problem, I could use Form_Dirty, but not for unbound Forms. I could put a line of code in the Change Event for each separate ComboBox, but this is a bit long winded.

There must be an easier way! Anyone have any suggestions?
Aug 12 '10 #1
2 1577
Stewart Ross
2,545 Expert Mod 2GB
Hi again bigukfan. I know from your previous question (see this thread) that you are looking to take a short-cut and avoid having code in the after-update events of each control, but there is simply no easier way...

When you change the contents of a combo box the After Update event is raised. The event sub for that control connects the event to allow you to deal with the event accordingly. At a minimum, there must be an after-update event handler for each control - and at least one line of code to do something as a result of the event.

It really is not much work to create ten after update subs which set a boolean value in each case - or call another sub to do so if there is more to it than that.

From the point of view of each control on your form they are all separate instances, not grouped as one entity, and they all raise individual events. You can respond to these or not, but I know of no way of grouping them together into one larger event as you ask.

-Stewart
Aug 12 '10 #2
Hi Stewart,

That is what I thought, so thanks for your time anyway.
Aug 12 '10 #3

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

Similar topics

2
by: R. Rajesh Jeba Anbiah | last post by:
I have Googled a lot, but couldn't still find the answer... I could see, I can trigger the "click" event like: button_object.Click() But, I need to trigger the onChange() of select options. I...
1
by: muhamad kassem | last post by:
hi all i have a program that display the content of the table from sql server this table change . how i can get the change event in this table .
1
by: djam | last post by:
Is there such a thing as a row change event in Win Forms? I can't seem to find anything similar, I'm using CurrentCellChanged but that gets fired mulitple times and its not the correct event for...
3
by: dave | last post by:
I have half a dozen web form radio buttons on a web form. Each of them is set to postback=true. However, if for instance radiobutton1 is already selected and the user selects it again, it performs...
7
by: Markus McGee | last post by:
Hi all, I have a quick question...I believe. On my web page, call it page A, I have a drop downlist with runat server enabled. When the drop downlist change event occurs it repopulates a...
2
by: David Jackson | last post by:
Hello, I have an unbound DataGridView of which one of the columns is a ComboBox colum containing category data, plus an additional option called <newSo when the ComboBox is dropped down it looks...
0
by: Karsten_Markmann | last post by:
Hi I am writing an Office Com Addin application for XP and Office 2003 I am writing i Visual studio 2003 VB. I have a made a custom toolbar with some buttons and a combobox on. The bar loads OK...
0
by: =?Utf-8?B?SiBTdHJlZ2Vy?= | last post by:
I have a procedure to increase/decrease the size of the columns in a datagrid proportional to their original size. I want to capture the event if a user manually resizes a column, so I can reset my...
3
by: SimonG via AccessMonster.com | last post by:
Hi, I would like to be able to compare a control's new value with its old value, whenever it is changed by a user. The control holds a numeric value, qty_Sold, when this value changes I need to...
2
by: muddasirmunir | last post by:
I am using vb6. I want to solve one problem to define clearly i will use a simple example. Take a form and put a combobox in it Private Sub Form_Load() Combo1.AddItem "Apple"
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
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
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
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.