473,467 Members | 1,570 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Combobox Change event

284 Contributor
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



Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2. Combo1.AddItem "Apple"
  3. Combo1.AddItem "Banana"
  4. Combo1.AddItem "orange"
  5. Combo1.AddItem "Lemon"
  6. End Sub
and on change event



Expand|Select|Wrap|Line Numbers
  1. Private Sub Combo1_Change()
  2. MsgBox Combo1.Text
  3. End Sub
  4.  
Now select differenct name like banana and orange with mouse or arrow keys but you will not get any message,why change event is not accuring when we change name and on what event we will get message as we select different name.

i want that when i change the name it will prompt/message me the selected name.
Jan 14 '09 #1
2 11572
debasisdas
8,127 Recognized Expert Expert
You need to use the Click event of the control.
Jan 14 '09 #2
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

Change Event is Fired only when Style=0 or 1 and text in the text box portion of the control changes.
So, as Debasis told, you need to write the code in Click event.

Regards
Veena
Jan 15 '09 #3

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

Similar topics

7
by: Nicolae Fieraru | last post by:
Hi All, I am trying to change the rowsource of a combobox when I click on it. I played with many events, associated with the form and the combobox, but still haven't figured out what is the way...
7
by: NCrum | last post by:
I want to set the Default value of a Combobox for any changeable record and have got this working but it is totaly unsatisfactory see the code below I loop through the items in the Combo looking...
12
by: Lars Netzel | last post by:
I have, in earlier projects, had som serious problems with ComboBoxColumns in a datagrid. And now I'm in a projects where I needs sometthing like that again.. but I really do not want to work with...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
7
by: Saber | last post by:
What's wrong here? Sub ShowDG() DsIllness1.Clear() DsIllness1.tblIllness.illIDColumn.ColumnMapping = MappingType.Hidden DsIllness1.tblIllness.illDescColumn.ColumnMapping = MappingType.Hidden ...
4
by: senfo | last post by:
Hello All, For some reason, the MouseDoubleClick event for my ComboBox does not appear to be working. I am not subscribed to any other events for this control. I pulled out Spy++ and noticed...
6
by: tbrown | last post by:
I have a combobox with items like this: {one,two,three}. The selected index is 0, so "one" appears in the combobox text. When the user drops down the list, and selects "two", for example, I...
3
by: ApexData | last post by:
COMBOBOX REFRESH DILEMMA ' I have been working for hours trying to figure out how to requery a combobox in a subform, from a Popup form ' that this subform had launched. Basically, I designed...
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...
2
by: Horst JENS | last post by:
Hi group, have problems with combobox-control in a form (access 2003). I added VBA-Code to on-Change event of the control. If the user choose an value from the control, the filter of the form...
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
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
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,...
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.