Jim Dettman
jimdettman at verizon.net
Sat Feb 6 09:22:45 CST 2010
Ah got it now; you are simply using hidden controls that are bound where I use unbound. The technique in general however is no different (using a control rather then a field for the link). I've always found it easier to push things up from a subform using Me.Parent rather then go the other way. And my main forms are typically bound. Jim. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Saturday, February 06, 2010 8:32 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Two levels up (or down) , twice removed I'll try to explain it more clearly. The topmost form is an unbound form - frmWrapper frmParent, frmChild and frmGrandchild are all subforms on frmWrapper. txtParentLink and txtChildLink are controls on frmWrapper. The Source of txtParentLink is set to =frmParent!Form.PK The Source of txtChildLink is set to =frmChild!Form.PK The Link Master Fields of frmChild is set to =txtParentLink The Link Master Fields of the frmGrandchild is set to =txtChildLink Now change the current record in frmParent: txtParentLink automatically updates to the new Parent.PK frmChild automatically requeries based on the new content of txtParentLink (frmParent,PK) txtChildLink automatically updates to the new Child.PK. frmGrandchild automatically requeries based on the new content of txtChildLink(frmChild.PK) It all happens without any on_current code. I can put a simple demo up on-line if you like. -- Stuart On 6 Feb 2010 at 8:06, Jim Dettman wrote: > Stuart, > > <<There's no need for an OnCurrent event if you set the source of the hidden > control to the PK > of the recordset of its parent form.>> > > Not sure I understand; the grandchild is related to the child subform, not > the parent. You need to do that on the grandchild to get the grandchild form > to sync properly to the child subform. > > It's the only way I know of putting both child and grandchild on a main > form. > > Jim. > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com