By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,908 Members | 2,041 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,908 IT Pros & Developers. It's quick & easy.

Databound combobox problem (mouse vs. keyboard)

P: n/a
I'm having a really weird problem with a combo box (drop down list) on
a databound form.

I load 3 values programmatically into the combo box "MALE" "FEMALE"
and "UNKNOWN". When I run the app, if I tab to the combo box and type
'm' on the keyboard "MALE" shows up in the combo box, but it doesn't
save when I execute my .update statement. But, if I click on the list
and select "MALE" from the drop down list, it saves into the database
just fine.

The only thing I can think of is that the Selected_Index_Changed event
fires for either the keyboard or the mouse, but the Text_Changed event
only fires with the mouse... I don't even know if that makes a
difference.

What I'd like is for the user to be able to type "m" and have the
value save.... how can I do that??

Using vb 2005 and SQL Server 2005

Thank you,

John
Mar 20 '08 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On Mar 20, 3:06*pm, JohnRou <john...@ci.green-bay.wi.uswrote:
I'm having a really weird problem with a combo box (drop down list) on
a databound form.

I load 3 values programmatically into the combo box "MALE" "FEMALE"
and "UNKNOWN". *When I run the app, if I tab to the combo box and type
'm' on the keyboard "MALE" shows up in the combo box, but it doesn't
save when I execute my .update statement. *But, if I click on the list
and select "MALE" from the drop down list, it saves into the database
just fine.

The only thing I can think of is that the Selected_Index_Changed event
fires for either the keyboard or the mouse, but the Text_Changed event
only fires with the mouse... I don't even know if that makes a
difference.

What I'd like is for the user to be able to type "m" and have the
value save.... how can I do that??

Using vb 2005 and SQL Server 2005

Thank you,

John
Are you talking about Web application or Windows application ?
Mar 20 '08 #2

P: n/a
>
Are you talking about Web application or Windows application ?- Hide quoted text -
Sorry, Windows app.
Mar 20 '08 #3

P: n/a
On Mar 20, 3:39*pm, JohnRou <john...@ci.green-bay.wi.uswrote:
Are you talking about Web application or Windows application ?- Hide quoted text -

Sorry, Windows app.
please give me code hows you doing ?
Mar 20 '08 #4

P: n/a
>
make one another simple form and do just again . May be you have
missed somhing in you settings ..- Hide quoted text -
I had tried that earlier with the same result. I even created a new
SQL database with just two fields to test it... same result. On my
real form, I have a bunch of comboboxes and they all function the same
way. It's not intermittant and only bothers the combo boxes....
Mar 20 '08 #5

P: n/a
With a lot of help, the problem has been identified. It turns out
that the VB IDE binds comboboxes to the Text property. That is
causing the erratic behavior. If you change the bind to the
SelectedItem value it works fine......
Mar 22 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.