Re: LinkMaster>LinkChild problem




"tina" <nospam@xxxxxxxxxxx> wrote in message
news:cRfth.445984$Fi1.124979@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
When I looked in the related tables, the record was
created in the child table, but its ID had not been inserted in the
parent
table (the record source for Subform 2).

umm, what? child records have a foreign key field that contains the
primary
key value of the related parent record - but parent records do not contain
the PK values of their child record(s).

In this case, the Parent/Child structure is reversed, because Subform 2
actually is a child of Subform 1, but Subform 3 has no direct relationship
with Subform 2's parent. It's a necessity of nesting that Subform 2 must
act *structurally* as Subform 3's parent, even though in a typical
parent/child secenario the reverse would be true. Since it is (roughly) a
1:1 relationship, there's no *real* parent or child. However, since the
"child" table maintains 1:1 relationships with many other tables, you can't
really put the FK on that side, because then you'd need some other
information to tell you which table that ID actually was referring to. And
that just gets messy.

for that new record in Subform 2 (yes, it's a 1:1 relationship, sort of).

correctly established table relationships are not "sort of" anything; they
are a specific type. in the Relationships window, is the link between the
two tables defined, or does it show as "Indeterminate" (or maybe that's
"Undetermined", i don't remember)?

Since *all* relationships seem to default to one to many and there does not
seem to be any way to edit that, any 1:1 relationship will be in the head of
the developer rather than something you can actually force Access to define.
So while Access believes that the child record could potentially be used in
many parent records (and I refer to the FORM structure not the TABLE
structure, since this isn't a typical heirarchical thing), at this moment it
is being treated as 1:1. Actually, I may wind up reusing the RTF defined in
the child record in other parent records, but I think that's even more
hoops.

Clearly, I've stepped outside the mental model that Access is best suited to
handle. However, the exact same structire works in other places, where
different parent forms show and edit a similar child form with no problem.
So I'm at a loss as to what is different here.

and btw, the Tab control on any form has nothing to do with subforms, it's
never included in a control reference and does not affect the form/subform
hierarchy in any way.

I didn't think so, but I felt it was worth mentioning, because it could
actually be relevant. For instance, on a different tab, another subform
acts as a parent to a slightly different subform which references the same
table as the problem subform, but with no problems. Could it be that having
two different subforms pointing to the same place on different tabs could
break things?

-Amy


.



Relevant Pages

  • Re: LinkMaster>LinkChild problem
    ... created in the child table, but its ID had not been inserted in the ... key value of the related parent record - but parent records do not ... In this case, the Parent/Child structure is reversed, because Subform 2 ... a foreign key field does NOT have to have the same name as its' ...
    (microsoft.public.access.forms)
  • RE: Data entry when using a tabbed control
    ... key, and child table primary key is getting duplicated, which is not allowed. ... There should be a 1:1 relationship from parent to this child, ... Parent table has general server info (hostname, desc, IP Addr, FQDN, etc. ... tab control has 3 tabs, with each tab having a sub-form. ...
    (microsoft.public.access.formscoding)
  • How do I set up Pointers from Parent to Child & vise-versa
    ... forth between the MainDlg (Parent) and the a TabDlg (Child). ... set up a pointer from the child tab back to the parent dialog via the ...
    (microsoft.public.vc.mfc)
  • Re: LinkMaster>LinkChild problem
    ... created in the child table, but its ID had not been inserted in the ... key value of the related parent record - but parent records do not ... In this case, the Parent/Child structure is reversed, because Subform 2 ... a foreign key field does NOT have to have the same name as its' ...
    (microsoft.public.access.forms)
  • Re: using combo boxes to filter records in a subform
    ... one parent record. ... the first subform is bound to the parent table. ... the second subform is bound to the child table. ... just put the controls on the main form. ...
    (microsoft.public.access.forms)

Loading