I have an unbound form Group Management which has three tabs on it holding other forms used to accomplish various tasks: Tab 1 – Printing reports; Tab 2 Adding people to various groups (frmMembershipGroups with a subform sbfrmMembershipGroups); Tab 3 – editing, adding and deleting group definitions(frmCommittee/GroupDefinitions).
Tab 2 and 3 each have a combo box used to lookup records on that form, Combo 7 & 8. If I delete a group out of the frmCommittee/GroupDefinitions, how can I get frmMembershipGroups and the two combo boxes to requery and update themselves?
I tried using the requery method following the syntax in VBA help and I just get #Deleted showing up.
Here is the code I used on the from frmCommittee/GroupDefinition
Private Sub Form_AfterUpdate()
Dim Rst As Recordset
Dim ctl1 As Control
Dim ctl2 As Control
‘ Return Control object pointing to list box.
Set Rst = Queries!qrycommittee
ctl1 = Forms![frmGroup Management]![frmCommittee/GroupDefinition]!Combo7
ctl2 = Forms![frmGroup Management]!frmMembershipGroups!Combo8
‘ Requery source of data for list box.
Rst.Requery
ctl1.Requery
ctl2.Requery
End Sub
Peter