Hello,
I have a form (frmRecord) which has a datagridview on it that represents related "tags" for the record shown on frmRecord. This datagrid view has a combo box, which shows available "tags". The data source for the datagrid view is tblJunctionBindingSource. The datasource for the combo box is tblTagsBindingsource.
frmRecord has a button on it to create a new tag. This button will open a form to add the new tag (frmAddTag). Code for this button's click event is below:
frmAddTag has the following code behind the save new tag buttons click event:
I can see in the debug folder that the database (access accdb) is indeed taking the record. But when clicking the combo box on frmRecord's datagridview, the new tag isn't available. What am I doing wrong??
I have a form (frmRecord) which has a datagridview on it that represents related "tags" for the record shown on frmRecord. This datagrid view has a combo box, which shows available "tags". The data source for the datagrid view is tblJunctionBindingSource. The datasource for the combo box is tblTagsBindingsource.
frmRecord has a button on it to create a new tag. This button will open a form to add the new tag (frmAddTag). Code for this button's click event is below:
VB.NET:
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
Dim frm As New frmAddTag
frm.ShowDialog()
End Sub
frmAddTag has the following code behind the save new tag buttons click event:
VB.NET:
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
frmRecord.TblTagsTableAdapter.Insert(Me.txtComment.Text.ToString, Me.txtDescription.Text.ToString, Date.Now())
frmRecord.TblTagsBindingSource.EndEdit()
frmRecord.TblTagsTableAdapter.Update(frmRecord.ACS_Engineering_Changes_beDataSet.tblTags)
frmRecord.TblTagsTableAdapter.Fill(frmRecord.ACS_Engineering_Changes_beDataSet.tblTags)
MsgBox("Record Added sucessfully")
Me.txtComment.Text = ""
Me.txtDescription.Text = ""
'refresh data grid view on form
frmRecord.TblJunctionDataGridView.Update()
'close form
Me.Close()
End Sub
I can see in the debug folder that the database (access accdb) is indeed taking the record. But when clicking the combo box on frmRecord's datagridview, the new tag isn't available. What am I doing wrong??
Last edited: