I have church membership data which is organized by family (FamilyData), member (MbrData) and Attendance. Attendance is tied to member and member to family. I want to be able to move a family member from one family to another (necessary if children marry to form a new family or if an adult child moves out and creates a new family). The idea was to chose the family and member from one pair of bound combo boxes (losing family) and independently choose a gaining family. Then simply change the member's FamilyID from the losing family to the gaining family. (This is probably naive and bound to fail -- suggestions on a better way would be appreciated.)
Hence, I have one dataset that I want to bind the two family comboboxes to the same table but have them work independently. I am mimicking
but not getting the correct response. The second box acts as if it is not bound at all. The FamilyDataBindingSource is the original binding source for the FamilyData table in the CATDataset.
I would appreciate suggestions and/or corrections in the following code.
'The following was generated by the designer -- the first box.
Me.cboLosingFamily.DataSource = Me.FamilyDataBindingSource
Me.cboLosingFamily.DisplayMember = "FamilyName"
Me.cboLosingFamily.FormattingEnabled = True
Me.cboLosingFamily.Location = New System.Drawing.Point(137, 74)
Me.cboLosingFamily.Name = "cboLosingFamily"
Me.cboLosingFamily.Size = New System.Drawing.Size(110, 21)
Me.cboLosingFamily.TabIndex = 6
Me.cboLosingFamily.ValueMember = "FamilyID"
'The following was coded by me -- the second box.
.DataSource = New BindingSource(CATDataSet.FamilyData, vbNull)
.DisplayMember = CATDataSet.FamilyData.FamilyNameColumn.ColumnName
.ValueMember = CATDataSet.FamilyData.FamilyIDColumn.ColumnName