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

Data entry into ComboBox

Okay, I'm probably re-inventing the wheel here, but I have two drop down
boxs on a form. One is "source" the other "destination", I'm using a
combobox each to provide MRU utility.

The setting I've changed are:
AutoCompleteMode -SuggestAppend
AutocompleteSource -FileSystemDirectory
Drop[DownStyle -Drop Down
Sorted -True

I populate the cbo at form load time (well, I would if I had anything with
which to populate it!)

I also have a browse button which sets cbo.text.

I'm having two problems and obviously (as always) don't know what I'm
looking for.

What event(s) are fired when I change the cbo.text - as when I insert it
from the folderbrowserdialogue (need to update the MRU list).
- and -
What event is fired when the user manually enters something and presses
return. I'm seeing nothing ....

If you can tell me how to tell what event is being fired, that would be
even better.

Thanks //al
Nov 26 '06 #1
4 2705

al jones wrote:
Okay, I'm probably re-inventing the wheel here, but I have two drop down
boxs on a form. One is "source" the other "destination", I'm using a
combobox each to provide MRU utility.

The setting I've changed are:
AutoCompleteMode -SuggestAppend
AutocompleteSource -FileSystemDirectory
Drop[DownStyle -Drop Down
Sorted -True

I populate the cbo at form load time (well, I would if I had anything with
which to populate it!)

I also have a browse button which sets cbo.text.

I'm having two problems and obviously (as always) don't know what I'm
looking for.

What event(s) are fired when I change the cbo.text - as when I insert it
from the folderbrowserdialogue (need to update the MRU list).
- and -
What event is fired when the user manually enters something and presses
return. I'm seeing nothing ....

If you can tell me how to tell what event is being fired, that would be
even better.

Thanks //al
When the text in a combo box changes, there is a TextChagned event ;)
when the user changes the selected item, there is a SelectedItemChanged
event.

Nov 26 '06 #2
On 26 Nov 2006 11:27:37 -0800, lo*********@gmail.com wrote:
al jones wrote:
>Okay, I'm probably re-inventing the wheel here, but I have two drop down
boxs on a form. One is "source" the other "destination", I'm using a
combobox each to provide MRU utility.

The setting I've changed are:
AutoCompleteMode -SuggestAppend
AutocompleteSource -FileSystemDirectory
Drop[DownStyle -Drop Down
Sorted -True

I populate the cbo at form load time (well, I would if I had anything with
which to populate it!)

I also have a browse button which sets cbo.text.

I'm having two problems and obviously (as always) don't know what I'm
looking for.

What event(s) are fired when I change the cbo.text - as when I insert it
from the folderbrowserdialogue (need to update the MRU list).
- and -
What event is fired when the user manually enters something and presses
return. I'm seeing nothing ....

If you can tell me how to tell what event is being fired, that would be
even better.

Thanks //al

When the text in a combo box changes, there is a TextChagned event ;)
when the user changes the selected item, there is a SelectedItemChanged
event.
Oh, I see, I just had it spelled wrong :)

I've been this round. What I'm seeing is TextChanged is being triggered
with each character entered (or suggestion accepted) [which I can
understand as one might want to do something as each character is
entered...] What I'm now seeing in my mru is "D", "D:", "D:\", etc, not
exactly what I had in mind. However, what I want is to trigger <something>
when they press enter after all the path / folder name has been entered.

I thought that cbox.SelectionChangeCommitted would be invoked - but even
with a breakpoint on the first line, I don't see it getting fired. Any
ideas what I'm missing here?

.... and I'd really appreciate it if your reply wasn't 'stop wanting that!'
:)

//al
Nov 26 '06 #3

al jones wrote:
>
Oh, I see, I just had it spelled wrong :)

I've been this round. What I'm seeing is TextChanged is being triggered
with each character entered (or suggestion accepted) [which I can
understand as one might want to do something as each character is
entered...] What I'm now seeing in my mru is "D", "D:", "D:\", etc, not
exactly what I had in mind. However, what I want is to trigger <something>
when they press enter after all the path / folder name has been entered.

I thought that cbox.SelectionChangeCommitted would be invoked - but even
with a breakpoint on the first line, I don't see it getting fired. Any
ideas what I'm missing here?

... and I'd really appreciate it if your reply wasn't 'stop wanting that!'
:)
I just checked, it lookes like the TextChanged event doesn't have any
way of telling you which key was pressed (which makes sense, because
TextChanged can occur due to non-keyboard input). You could listen to
the KeyDown or KeyPress events, because those WILL tell you which key
was pressed (e.keycode or something like that, I forget exactly ;) ).
I don't know if "Enter" key will be a problem or not... it might
trigger other behaviour, but I doubt it.

Nov 26 '06 #4
Refreshing this topic a little. If I change the exit to cbox1.leave then
it depends on the user to use the mouse (or tab) to go to some other box.
I find it hard to believe that MS doesn't have the enter key enabled there
so I'd guess that I'm just missing something.

Now, how do I tell which item they've selected if they select an item from
the dropdown. Reson being, once they've selected / entered / browsed to
the item, then moved out of the cbobox, I'm not displaying anything in the
text area of the combobox ....

//al
Nov 27 '06 #5

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

Similar topics

2
by: Iain Miller | last post by:
Struggling a bit here & would be grateful for any help. I have a table which has a list of people in it. Each person has a unique ID automatically allocated by Access but also belongs to one of 5...
1
by: Alex.Wisnoski | last post by:
I have a data entry form with a combo box to look up an entrant's name. If the name is already in the table then it pulls up the record and that part of the form works fine. If the name isn't in...
1
by: Trent | last post by:
I am in the design phase of a new database and am having a devil of a time with a subform. I have three tables that relate to problem - Suppliers tbl, Customers tbl and a SuppliersCustomers tbl....
15
by: PC Datasheet | last post by:
I have a form with an unbound combobox at the top and seventeen controls below it. Is there a simple way to prevent data entry in any of the controls until a selection is made in the combobox? ...
10
by: Tosch | last post by:
I have a combobox where a user can select a zoom factor or enter a zoom factor. I tried to limit entry into the combobox to numbers only by catching the keydown event and setting e.handled = true...
5
by: Steve B. | last post by:
Without adding whitespace to the ComboBox datasource is there a way I can add a blank entry or, a reset entry, to the ComboBox dropdown Thanks Steve
1
by: tizmagik | last post by:
I have a combobox on a continuous form that has a recordsource that is set upon Form_Load event via VBA (based on initial form data and external form data entered). For data entry purposes the...
1
by: Richard | last post by:
Very typical normal data Table One ------ One.OneID (PK) One.Name One.Description One.TwoID (FK) One.ThreeID (FK) ....
8
by: Wingot | last post by:
Hey, I have a program I am trying to write using Visual C#, SQL Server 2005/2008, and Visual Studio 2008, and one part of it includes a Schema called Client. Inside this schema, three tables...
1
by: Maria DiGiano | last post by:
I am using Access to organize data from a survey which uses a Likert scale to measure response- the scale is 3 points- "I agree", "I don't know" and "I disagree". The numerical value of each...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.