[AccessD] Two levels up (or down) , twice removed

jwcolby jwcolby at colbyconsulting.com
Wed Feb 3 13:26:29 CST 2010


Stuart,

When I did this I was able to pull a grandchild form out of the child form and place it directly on 
the main form and the combo then displayed correctly.

John W. Colby
www.ColbyConsulting.com


Stuart McLachlan wrote:
> If you think about it, the parent can't finish loading until it's children have loaded since they 
> are in controls inside the parent.
> 
> I use an unbound parent "wrapper form" with all of the other forms as first level children. The 
> form also has a series of hidden text boxes which point to the PK in the parent form. I use the  
> textbox as the "Link Master Field" for the child form.
> 
> Most of the system I do these days use this method extensively.
> 
> As an example, tak a geographic system using a hierarchy of:
> Province, District, LLG (Local Level Government Area), Ward with
> 
> tblProv = Prov_PK,Prov_Name....
> tblDist = Dist_PK, Prov_FK, Dist_Name.......
> tblLLG = LLG_PK, Dist_FK, LLG_Name...
> tblWard = Ward_PK,LLG_FK,Ward_Name......
> 
> I create an unbound form frmMain with 4 child forms
> frmProv, frmDist, frmLLG, frmWard.
> I place the 4 child forms side by side on the parent form
> 
> I  create 3 hidden text boxes
> txtProvLink  = [frmProv].[Form]![Prov_PK]
> txtDistLink  = [frmDist].[Form]![Dist_PK]
> txtLLGLink  = [frmLLG].[Form]![LLG_PK]
> 
> I  set up the child form dependencies as:
> frmDist: Linked Master Field = txtProvLink, Linked Child Field = Prov_FK
> frmLLG: Linked Master Field = txtDistLink, Linked Child Field = Dist_FK
> frmWard: Linked Master Field = txtLLGLink, Linked Child Field = LLG_FK
> 
> This method completely solves your problem. A child form does not update until the form 
> above it has finished updating.
> 
> It also has a few other advantages:
> allows you to have as many generations as you can fit on your screen
> you can use any combination of  Single Form and Continuous Form  at the various levels.
> you can layout the screen in any way you want, you don't need child forms completely 
> embedded inside its parent.
> 
> 



More information about the AccessD mailing list