# Solved: Access 2007- Object doesn't contain the automation object



## draytond (Jul 20, 2011)

*Overview:
*
I have a form with a subform. When I try to add a record in the subform, I get the error in the title.

*Here are the specifics:*

The purpose of the main form is to show the financial information related to a specific project, which was chosen on the previous form. The subform on the main form displays each of the payments associated with the project (there can be infinite payments per project, and the relationships have indeed been set in the Relationships window).

_The main form data source_: qry_all_project_info_by_project_id (pulls data from tblProjects table)

_Subform data source_: tblAdditionalPayments (this is where I want to add in new payments associated with the project.

_Subform master link field_: tblProjects.__pkProjectID

_Subform child link field_: _fkProjectID (from tblAdditionalPayments)

The exact error, which pops up when adding new record in the subform: "The LinkMasterFields property has produced an error. 'The object doesn't contain the automation object 'tblProjects.'"

I've been looking for a solution for hours in over a dozen different forums, but I can't figure out what's wrong, as most people have simply been forgetting to set their master/child field or fixing the problem by re-creating the tables on which the forms are based. Neither approach has worked for me. Any help would be HIGHLY appreciated. Thank you so much in advance.


----------



## draytond (Jul 20, 2011)

Like everyone else who's had this problem, instead of actually solving the problem, I managed to find a work around. The actual cause of this problem continues to be completely illusive. 

What I ended up doing was completely deleting the content of subform's Master and Child link fields (which let me enter new records, but not associated with any specific project). Instead of relying on this link to make sure I was making new records associated with a specific project, and instead made created a hidden field that had a default value of the correct project ID, then I linked that hidden field to the field in the table that holds the foreign keys.


----------

