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

Combobox problem

P: n/a
I'm having an issue with a combobox that is making no sense to me at all.

I have a form with several comboboxes/textboxes.
The values in these boxes are based on a datarowview, which is based on a
listbox.selecteditem.

When a different item is selected in the listbox, all the fields are
repopulated with the correct data.

I have 1 combobox which is acting weird.
The combobox values are populated from a table, and can contain a blank
value, or 1 of 3 other values.
The dropdown property is set to dropdown, so users can enter other values
(this is so old data from the database still displays).

When the form is populated, if the value in this combobox is old data (that
isn't in the list), and it is displayed, then when a new record is selected
in the listbox, all fields update and show the correct data, except for this
combobox, it shows the same text.

As a temporary fix, I replaced the combobox with a textbox. I left all the
code that populated it exactly the same, and it works fine...so I'm assuming
it is an issue with the actual combobox, and not with the code that is
populating it...

Where can I start to debug this problem??
TIA!
amber

Apr 4 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"The dropdown property is set to dropdown, so users can enter other values
(this is so old data from the database still displays)."

Without actually seeing your application I would suspect that allowing this
functionality of keeping old data is the culprit. From what I gather in your
statements you want this old data to remain until the point that you change
your listbox index.

1: You could try a combobox.text = to set it to something other than the old
value. force it to update to what you want even if it isnt in the list. This
should only affect the current value and not the items included.
2: If the items in the combobox are not updating and you would like them to,
try using the combobox.clear function and then use the combobox.items.add
function to individually add the items back in that you need so that you have
a clean update.
3: put a break in your code just before the combobox is updated and step
through one by one and watch the data in the combobox. It may provide you
with a clue as to what is going on.

"amber" wrote:
I'm having an issue with a combobox that is making no sense to me at all.

I have a form with several comboboxes/textboxes.
The values in these boxes are based on a datarowview, which is based on a
listbox.selecteditem.

When a different item is selected in the listbox, all the fields are
repopulated with the correct data.

I have 1 combobox which is acting weird.
The combobox values are populated from a table, and can contain a blank
value, or 1 of 3 other values.
The dropdown property is set to dropdown, so users can enter other values
(this is so old data from the database still displays).

When the form is populated, if the value in this combobox is old data (that
isn't in the list), and it is displayed, then when a new record is selected
in the listbox, all fields update and show the correct data, except for this
combobox, it shows the same text.

As a temporary fix, I replaced the combobox with a textbox. I left all the
code that populated it exactly the same, and it works fine...so I'm assuming
it is an issue with the actual combobox, and not with the code that is
populating it...

Where can I start to debug this problem??
TIA!
amber

Apr 4 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.