|
-
Mar 15th, 2009, 10:20 PM
#1
Thread Starter
Member
[RESOLVED] [2008] Combo Update
I have a form wich contains a combobox that is filled from a sql databse table,
this combo is named ManufacturerComboBox.
If a manufacturer is not already entered into the database you can click a label and it invokes another form called Add Manufacturer.
everything works ok except after i enter a new manufacturer into the Add Manufacturer datagrid it doesnt refresh into the ManufacturerComboBox unless i exit the Form and re-enter.
What is a good way to repopulate this combo box?
The combo box is in unbound mode and is populated by code:
With ManufacturerComboBox
.DisplayMember = "Manufacturer"
.ValueMember = "ManufacturerID"
.DataSource = GetManufacturers() 'public sub
End With
In the Add Manufacturer form in the closing event:
Me.AddManDataGridView.Update()
Me.AddManManufacturersTableAdapter.Update(Me.MemKingDataSet.AddManManufacturers)
AuditItem.Refresh() ' audit item is the name of the form that the combo box resides.
I tried to use AuditItem.ManufacturerComboBox.update() in the form closing event but it didnt work, what is the best wat to handle this?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|