Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Message when entering data into subform 1

Status
Not open for further replies.

swaybright

Technical User
Jun 25, 2003
156
US
Hi all,

I'm getting the error:
The LinkMasterFields property has produced this error:The object doesn't contain the automation object "Molecule".

This happens when I try to enter data into the subform.
The form and subform were created using the form wizard.
The forms record source is a query based on two tables that have a one-to-one relationship. The subform is has a record source that contains a foreign key of the main table.

This is really causing some headaches for me, so any input would be great!

Thanks,

Shane
 
Everyone,

There are several others out there that have experienced this error with no feedback ( thread702-282346 thread702-350927 thread702-283028 thread702-540459 thread702-444708 ) I don't know if they figured it out or not but I think I have the solution.

First verify that the master and child link properties are correct and the relationship between the two tables are correct. This I did by using the form wizard.

The problem lay in the way the query was set up. The related fields in a query are always distinguished by table name ([tablename].[fieldname]). If the related field in the subform is also the same, Access gets confused. This happens because the master field property will be [tablename].[fieldname]. This syntax evidently refers to something other than the desired parent field (you programming gurus can probably explain this better than I).

The solution: In the query, set the sql select statement to be Select tablename.fieldname AS tablename_fieldname, etc. . . Now set the master link property of the subform to tablename_fieldname and everything should be working properly.

I hope that the explanation makes sense.

Shane
 
swaybright,
I thought I followed your suggestion to correct the "Automation object not found" error, but it still gives me the same error.
Thanks,
Emmali

Here's my specs:

Visit Data Subform, Link Master Fields: [Client Personal Info_ClientID], Link Child Fields: ClientID
list box: ClientID, Row Source:
SELECT [Client Personal Info].[ClientID] AS [Client Personal Info_ClientID] FROM [Client Personal Info];

Center for World Indigenous Studies

"Always carry a tuna sandwich in case of tigers."
 
is the error phrased as:
The LinkMasterFields property has produced this error:The object doesn't contain the automation object "YourMainFormName".

Double check the name property of anything you reference and make sure it matches the reference string.

Shane
 
No,
The error says "...object 'TableName_lbxName'"
Emmali
 
You'll have to forgive me as I am still learning Access myself...
I have been assuming that you are getting the same error I posted in this thread. What is the object 'TableName_IbxName'? The thing I notice is that it isn't a value in the master or child links property.

Automation errors can occur because of any number of things. Check around this site for anyone who has experienced the exact same error you are getting. Also, post the exact syntax of the error here and I will try to help anyway I can.
 
The error message I received appeared to be identical to yours:
The LinkMasterFields property setting has produced this error: "The object doesn't contain the Automation object 'Client Personal Info_ClientID'."
...where refers to the list box (lbx) ClientID which links to TableName_FieldName. Of course, now I can't even figure out where that was, or where I was (I only work at this job 2 days a week). Ack.
 
So, You want to link the subform to the value selected from the list box and have the subform requery?
If so,
Make sure that the bound column of the list box is equal to the desired link field (It looks like that is true)
Set the link master fields property of the subform equal to the name of the listbox
If you want the user to change the value and have the subform update, put in the afterupdate event of the list box
Me!Subformname.requery

Hope that helps

Shane
 
Wonderful! It no longer complains! Now, if I could just get the form to update the table...
Thanks!
Min

Center for World Indigenous Studies

"Always carry a tuna sandwich in case of tigers."
 
Wonderful! It no longer complains! Now, if I could just get the form to update the table...
Thanks!
Min
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top