N
Nick Mirro
Can't seem to solve this. The object is to have all linked subforms update
while cycling parentmost form. The listbox also needs to update to match
the parentform record. When I select a contact in the listbox, the subform
it resides in and all children forms need to update to the selected row in
the listbox. (see bottom for actual result)
Parentform = frmDataExchange (one)
1st subform = sbfrmContactInfo (many)
Listbox = ContactsList (in subform)
Parentform (OnCurrent event)
-----------
Public Sub Form_Current()
Me![sbfrmContactInfo].Form![ContactsList].Requery
End Sub
Listbox (AfterUpdate event)
--------
Public Sub ContactsList_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
MsgBox Me.ContactsList
Set rs = Me.Recordset.Clone
rs.FindFirst "[ContactID] = " & Nz(Me![ContactsList], 0)
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Listbox (RowSource criteria)
--------
[Forms]![frmDataExchange]![OrgId]
Everything works except that the listbox does not update records in its
subform or children forms. When I select a row in the listbox, this line
"MsgBox Me.ContactsList" always returns the correct organization foreign key
"1 or 2."
Here's the odd part: If I break the Master/child link between the parent
form and the subform, the listbox works one time. If I select a row in the
listbox, the subform record, and children subforms will all update, but only
one time. Strangely, all children subforms also update if I cycle the
parent form, even with the first M/C link broken.
Nick
while cycling parentmost form. The listbox also needs to update to match
the parentform record. When I select a contact in the listbox, the subform
it resides in and all children forms need to update to the selected row in
the listbox. (see bottom for actual result)
Parentform = frmDataExchange (one)
1st subform = sbfrmContactInfo (many)
Listbox = ContactsList (in subform)
Parentform (OnCurrent event)
-----------
Public Sub Form_Current()
Me![sbfrmContactInfo].Form![ContactsList].Requery
End Sub
Listbox (AfterUpdate event)
--------
Public Sub ContactsList_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
MsgBox Me.ContactsList
Set rs = Me.Recordset.Clone
rs.FindFirst "[ContactID] = " & Nz(Me![ContactsList], 0)
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Listbox (RowSource criteria)
--------
[Forms]![frmDataExchange]![OrgId]
Everything works except that the listbox does not update records in its
subform or children forms. When I select a row in the listbox, this line
"MsgBox Me.ContactsList" always returns the correct organization foreign key
"1 or 2."
Here's the odd part: If I break the Master/child link between the parent
form and the subform, the listbox works one time. If I select a row in the
listbox, the subform record, and children subforms will all update, but only
one time. Strangely, all children subforms also update if I cycle the
parent form, even with the first M/C link broken.
Nick