Can't add record to SubForm ??

W

Will

I have a subform like the one on the NorthWind Orders form.

But it won't let me add a record to it.

Instead of Orders mine is for Phone Numbers.

I get the following error message...

"LinkMasterFields property setting has produced this error: The object
doesn't contain the Automation object tblContacts"

My Table Structures are like this.

tblContacts
idContact (key)
Name

tblLinking
idContact (key)
idPhone (key)

tblPhone
idPhone (key)
Phone
WhatPhone

- Main Form is built on a query with the fields from tblContacts
- Subform is built on query with the following fields...
tblLinking.idContact
tblLinking.idPhone
tblPhone.Phone
tblPhone.WhatPhone

When I setup the SubForm I defined the fields that link the ContactForm to
the PhoneForm as the idContact.

Can anyone help me figure this out?

Many thanks.
 
A

Allen Browne

Open your main form in design view.
Right-click the edge of the subform control, and choose Properties.
On the Data tab of the Properties box, what is in these properties:
LinkMasterFields
LinkChildFields

Entering the correct control names there should solve the problem.

If Access still seems confused, uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
For an explanation of why, see:
Failures caused by Name Auto-Correct
at:
http://allenbrowne.com/bug-03.html
 

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