Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Desperate - Synch two subforms

Status
Not open for further replies.
May 5, 2000
168
US
I am trying to sychronize to subforms. Sub1 is a datasheet view, Sub2 contains two memo fields based on the same table and sub1. They are displayed on a main form that is unbound.

I put the memo fields in a separate form because they could not be displayed nicely in the datasheet view.

I have tried everything I could find in my Access books to get these to subforms to synchronize but have had no success.

 
Put an invisible text box on your main form. In the oncurrent event of the first subform put your key field value into the text box (Me.Parent!txtBox = whatever) then link the second subform using the invisible text box. The second subform will automagically keep in sync. "The Key, The Whole Key, and Nothing But The Key, So Help Me Codd!"
 
This doesn't work in my case because the main form is not the parent form. It is unbound and has no relationship to the subforms.

Any other suggestions?
 
I found this code for synchronizing two subforms that arent related to the main form.

Set subColumnar.Form.Recordset = subTabular.Form.Recordset

This works find until you sort the records in the first subform (it is a datasheet view) then the synchronization is not effective anymore.
 
The way I explained doesn't require any relationship other than the one text box. The main form need not be bound. I have done this. When you link the main form to the second subform specify the mainform text box as the 'Link Master Field' to the corresponding 'Child Master Field' of your second sub form. "The Key, The Whole Key, and Nothing But The Key, So Help Me Codd!"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top