Combox Vb.NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
Angela said:
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?
 
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
 
Back
Top