LinkMaster>LinkChild problem

A

Amy Blankenship

Hi, all;

Note: This is a repost of an earlier post that did not achieve resolution.

I have a rather complex form with a subform that has a tabset in it. Each
tab has a different form relating to the parent subform. And each of those
subforms has more subforms doing different things. In one of the tabs on
the tabset, its subform has a form that has problems with its
LinkMaster>LinkChild relationship. For reference:

Form
-Subform 1
-Tabset
-Subform 2
-Subform 3

In Subform 3 there seems to be a problem with the LinkMaster>Child
relationship. At first, when I added content, I got a message that either
the content was too long, the form was read only, or something else I don't
recall at the moment. 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).

So I tried to repair the LinkMaster/LinkChild relationship. Clicking on the
.... next to the LinkMaster gave me a dialogue called "Subform Field Linker"
with the message "Object variable or With block variable not defined." I
tried reinserting the form and manually setting up the Master/Child
relationship and recreating Subform 2 from scratch. In the recreated
version, if you change to a new, blank record in Subform 2 after viewing a
record with a linked record in Subform 3, the blank record will still show
the record in Subform 3 even though no data has ever been created for that
new record in Subform 2 (yes, it's a 1:1 relationship, sort of).

I have verified that the LinkMaster ... button works on other subforms in
the same main form. I have also verified that the relationship is set up
properly between the tables on Subform 2 and Subform 3.

If you look at the values in the LinkMaster and LinkChild fields in the form
properties, they appear to be correct.

Update:

I found that somehow the form had managed to create a record in the table
used as the data source for "Subform 3" with a PK of 0 in a field of type
Autonumber. This explains why new records displayed that text.

I then made the linked fields visible in Subform 2 & 3. When I deleted the 0
record and navigated to the parent record in Subform 2, the parent record
showed 0 and the child record showed {Autonumber}. When I tried to paste
into the text box bound to the memo field in Subform 3, I got this message:

"You can't assign a value to this object.
*The object may be on a control on a read-only form
*The object may be on a form open in Design view.
*The value may be too large for this field."

On clicking OK, the value actually DOES paste, but then the Autonumber value
is replaced by an ID that I know to be in use. Closing the form results in
an error message that says that the changes could not be made to the table
because they would create a duplicate in the primary key (duh).

If you reopen and close the form and try the above again, the exact same
thing happens, except that the record number it is trying to write to goes
up by one each time.

Anyone have ANY idea what the heck is going on here?

Thanks;

Amy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top