PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms Combobox doesn't always update

Reply

Combobox doesn't always update

 
Thread Tools Rate Thread
Old 02-06-2005, 07:47 PM   #1
=?Utf-8?B?S2VpdGg=?=
Guest
 
Posts: n/a
Default Combobox doesn't always update


Hi,
This has been bugging me for a day now. I have a win form, with a few
comboboxes and textboxes. One combobox is giving me fits. Lets call it
"location".
The comboboxes are bound to SQL Server tables and appear to work find, MOSTLY.
Here's how it's not working:
I open the form, and choose a record which has a value in the "location"
column. The text boxes and all combo boxes are populated nicely, including
the "location" column combobox.
I now choose a record that doesn't have a value for "location". The form
fills in nicely, and the "location" combo box is now blank. Good.
Now, I choose a record that does have a value for "location". The form
fills in nicely, EXCEPT for the "location" combo box. Even though the record
DOES have a value, it doesn't get updated. However, if I now choose a
different record that has a "location" value, the "location" combo box DOES
get updated.
Whenever a record is chosen (by selecting a name from a different combo box,
which is working fine), my code checks to see if a record exists for that
name. If not, one is created, with the key elements populated. Then, the
form is updated with the info for that record. If the record does exist, it
just updates the form with the info from that already-existing record.
This is bizarre. Any ideas?
Thanks

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off