Join key of table

B

Bill Andersen

When I attempt to enter data into the child form of a parent newrec, I get
the error message: "Cannot add records; Join key of table 'tblApply" not in
recordset. Error 3348." Searching error 3348 I am directed to the Microsoft
Product Support Group which, apparently, wants $250.00 to answer my question.
Can I get a cut rate answer from this group?
 
J

Jack Leach

Send me a check for $249.50 and we'll call it a bargain <g>

Here's my thoughts...

When the focus is switched from the Parent to the Child (or vice-versa), the
form losing the focus will automatically save. So if there's no data for the
parent to save, there would be no foreign key for the Child to work from.

Usually an Autonumber Primary Key on the parent form saves in the background
at this point, which is generally then used as the Child's Foreign key... if
this is not the case you may have to explicitly enter the PK/FK information
on the Parent before trying to add new records to the Child.

hth
--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 
J

Jack Leach

Send me a check for $249.50 and we'll call it a bargain <g>

Here's my thoughts...

When the focus is switched from the Parent to the Child (or vice-versa), the
form losing the focus will automatically save. So if there's no data for the
parent to save, there would be no foreign key for the Child to work from.

Usually an Autonumber Primary Key on the parent form saves in the background
at this point, which is generally then used as the Child's Foreign key... if
this is not the case you may have to explicitly enter the PK/FK information
on the Parent before trying to add new records to the Child.

hth
--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 
J

John W. Vinson

When I attempt to enter data into the child form of a parent newrec, I get
the error message: "Cannot add records; Join key of table 'tblApply" not in
recordset. Error 3348." Searching error 3348 I am directed to the Microsoft
Product Support Group which, apparently, wants $250.00 to answer my question.
Can I get a cut rate answer from this group?

How are you with "free"? <g>

What are the Recordsource properties of the main form and the Subform? What
are the Master Link Field and Child Link Field? Most critically - is the join
key of tblApply in fact NOT in the subform's recordsource? It should be and
from the message it would seem that it isn't.
 
J

John W. Vinson

When I attempt to enter data into the child form of a parent newrec, I get
the error message: "Cannot add records; Join key of table 'tblApply" not in
recordset. Error 3348." Searching error 3348 I am directed to the Microsoft
Product Support Group which, apparently, wants $250.00 to answer my question.
Can I get a cut rate answer from this group?

How are you with "free"? <g>

What are the Recordsource properties of the main form and the Subform? What
are the Master Link Field and Child Link Field? Most critically - is the join
key of tblApply in fact NOT in the subform's recordsource? It should be and
from the message it would seem that it isn't.
 
B

Bill Andersen

The parent form and the child form use the same query. The link fields
identify the same variable in both forms (Receipt Number). This is still a
mystery to me, but like most programmers, I found a work around. Thank you
for your thoughts.
 
B

Bill Andersen

The parent form and the child form use the same query. The link fields
identify the same variable in both forms (Receipt Number). This is still a
mystery to me, but like most programmers, I found a work around. Thank you
for your thoughts.
 
B

Bill Andersen

The VBA program assigns a number to the parent form before going to the child
form where the same number is assigned (Receipt Number). I have used this
approach in the past successfully. Why it does't work here I do not know.
In any event I proceeded with a successful workaround. Thank you for your
thoughts.
 
B

Bill Andersen

The VBA program assigns a number to the parent form before going to the child
form where the same number is assigned (Receipt Number). I have used this
approach in the past successfully. Why it does't work here I do not know.
In any event I proceeded with a successful workaround. Thank you for your
thoughts.
 
J

John W. Vinson

The parent form and the child form use the same query. The link fields
identify the same variable in both forms (Receipt Number).

That seems unusual, and will probably give you "the record is locked by
another user" error messages. Why would you have a form *AND* a subform based
on the same table and the same record???
 
J

John W. Vinson

The parent form and the child form use the same query. The link fields
identify the same variable in both forms (Receipt Number).

That seems unusual, and will probably give you "the record is locked by
another user" error messages. Why would you have a form *AND* a subform based
on the same table and the same record???
 
B

Bill Andersen

It turns out that the source of these two forms ought to have been the table
from which they spring and not a query. When changed to the table,
everything works as advertised.

Microsoft solved this dilemma via Easy Assist in 5 minutes for $50.00.

Thank you for trying to solve this problem. I realize that your time is
valuable and spending it on my problem is very generous of you.
 
B

Bill Andersen

It turns out that the source of these two forms ought to have been the table
from which they spring and not a query. When changed to the table,
everything works as advertised.

Microsoft solved this dilemma via Easy Assist in 5 minutes for $50.00.

Thank you for trying to solve this problem. I realize that your time is
valuable and spending it on my problem is very generous of you.
 

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