Hope someone can help me with this problem I am having linking a form
to a subform with link child fields and link master fields.
Basically I have a form: "pupils details"
My form has a subform: "pupils_sub" (though it's control name is "child300").
Each form is based on a different table but both tables
have a longint field called "link_id".
In the properties of "child300" I have set the child and
master fields to "parents.link_id" and "pupils.link_id".
This means that each pupil's details record on the main form
will bring up the corresponding parent's details on the subform.
Everything works fine so long as there is a corresponding
parent record. But sometimes we might have added a new pupil
record and not got around to adding the parent record so Access
can't link the Child and Master link fields.
Then an error appears which says:
"the linkmaster fields property setting has produced this
error: "the object doesn't contain the automation object Pupils".
Question 1. How do I get rid of this annoying message?
Question 2. If we've just added a new pupil record on the
mainform, how do I get Access to jump to the subform and create
a new record in the "Parents" table and set it's "link_id" to
the "link_id" of the current pupil record in the mainform?
Should I use some sort of VB code or should this be fixed with
SQL or macros or something?
PS: I am using Access 97 for this project.
Thanks for any help!..