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

Combox Vb.NET

P: n/a
Hi,

Before with comboboxes you could either select something from the lsit or
you could type in a different value (one that is *not* in the list) to use.

I have a combobox of cities and sometimes the city names are not in my
zipcode table.

So I need to be able to type in a city name other than what is in my zipcode
table and be able to save it.

Everytime, I try this with VB.NET Form Control Combobox. When I move to the
next record it will select a value in the lsit to save and save it.
*Discarding* the city name I actually typed.

How do I get the combobox to act the old way. That is allowing a person to
either select from the dropdown list or to type in something different?

Many thanks!
Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Angela" <An****@discussions.microsoft.com> wrote in message
news:7B**********************************@microsof t.com...
Hi,

Before with comboboxes you could either select something from the lsit or
you could type in a different value (one that is *not* in the list) to
use.

I have a combobox of cities and sometimes the city names are not in my
zipcode table.

So I need to be able to type in a city name other than what is in my
zipcode
table and be able to save it.

Everytime, I try this with VB.NET Form Control Combobox. When I move to
the
next record it will select a value in the lsit to save and save it.
*Discarding* the city name I actually typed.

How do I get the combobox to act the old way. That is allowing a person
to
either select from the dropdown list or to type in something different?

Many thanks!


Are you trying to save the new city name in the combo box's items collection
or somewhere else?
Have you tried saving what was typed (the Text property) and either putting
it into the combo box's Items collection or saving it in a variable using,
as a possible candidate, the LostFocus event procedure?

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.
Jul 21 '05 #2

P: n/a
Hi Peter,

Thanks for replying... I figured out what I did wrong...

I had binded to a dataset and when doing so I binded the .SelectText value
for the saving value.

Inorder to get it to work I binded the .Text value of the combobox to the
dataset and it fixed my problem... Atleast I think... I haven't fully tested
it yet...

Many Thanks,

Angela

"Peter van der Goes" wrote:

"Angela" <An****@discussions.microsoft.com> wrote in message
news:7B**********************************@microsof t.com...
Hi,

Before with comboboxes you could either select something from the lsit or
you could type in a different value (one that is *not* in the list) to
use.

I have a combobox of cities and sometimes the city names are not in my
zipcode table.

So I need to be able to type in a city name other than what is in my
zipcode
table and be able to save it.

Everytime, I try this with VB.NET Form Control Combobox. When I move to
the
next record it will select a value in the lsit to save and save it.
*Discarding* the city name I actually typed.

How do I get the combobox to act the old way. That is allowing a person
to
either select from the dropdown list or to type in something different?

Many thanks!


Are you trying to save the new city name in the combo box's items collection
or somewhere else?
Have you tried saving what was typed (the Text property) and either putting
it into the combo box's Items collection or saving it in a variable using,
as a possible candidate, the LostFocus event procedure?

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.