MartyConnelly
martyconnelly at shaw.ca
Mon Apr 28 20:19:43 CDT 2003
Another method might be to use the DataShape provider http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q196/0/29.asp&NoWebContent=1 Microsoft Knowledge Base Article - 196029 HOWTO: Create Hierarchical Recordsets Programmatically Microsoft Knowledge Base Article - 189657 HOWTO: Use the ADO SHAPE Command http://support.microsoft.com/default.aspx?scid=kb;en-us;189657 or this reference is odd because it mentions ADO version 2.8 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/pg_ado_shape_hierarchy_1.asp Microsoft Knowledge Base Article - 194516 HOWTO: Use ADO Hierarchical Recordsets http://support.microsoft.com/default.aspx?scid=kb;en-us;194516 Stuart McLachlan wrote: >On 28 Apr 2003 at 13:07, Mcgillivray, Donald [CC] wrote: > > > >>Using Access97 on Windows 2000. >> >>I have three tables from which I want to display related data on a >>single form. >> >>The tables are hierarchically related: >> >>tblProjects is the uppermost parent >>tblPhases contains child records related to specific records in >>tblProjects >>tblMilestones contains child records related to specific records in >>tblPhases >> >>My approach so far has been to create an unbound main form with three >>combo boxes - one for each table in the hierarchy, returning the >>table's primary key - and then to embed a single-form subform for each >>table in a tab control. >> >> > >I usually do this with three subs forms and a couple of hidden boxes. >Include a hidden textbox in each subform detail containing the PK > >Create a hidden textbox txtProject. Set it's source to "= >subfrmProjects.PK". >Create a hidden textbox txtPhases. Set it's source to " = >subfrmPhases.PK" >Set subfrmPhases "Link Master Field" to txtProject >Set subfrmMilestones "Link Master Field" to txtPhase > >Now whenever you click on a record it Projects, Phases will display >the appropriate records, same with Phases/Milestones. > >To allow you to add records, set subfrmMilestones.Before Update to >include: > >Phase_FK = Forms.frmMainForm.txtPhases. > >Similarly in subfrmPhases "Before Uupdate": >Project_FK = Forms.frmMain.txtProject > > > > >