Automation object error

R

Rob

I have a tabed form that has several subforms. One of the
subforms gives me the following error when I try to add
new records to it:

The LinkMasterFieldsd property setting has produced this
error: 'The object doesn't contain the Automation
object 'personnel."

The two table involved have a one to many relationship
with referential integrity enforced.

The master and child forms are linked through the
personnel.id and the child.id fields.

Is there any way to get the subform to allow me to add a
new record?

Thanks
 
T

TC

What is the content of the LinkMasterFields and LinkChildFields properties
of the relevant subform control?

Remember that LinkChildFelds is meant to be *fields* (not controls) in the
subform's recordsource. LinkMasterFields can be fields in the main form's
recordsource, or controls in the main form.

HTH,
TC
 
R

Rob

The content of the fields are personnel.id and
child.personnelid. These are the fields that the tables
are related with.
 
T

TC

You need to tell me precisely what you have *typed in to* the
LinkMasterFields and LinkChildFields properties of the subform control.

Is that really:

personnel.id
child.personnelid

?

TC
 
R

Rob

The exact things are: Masterfield: Personnel.PersonnelID
Childfield: PersonnelID
The one in the masterfield is the primary key for
the "Personnel" table.
The one in the childfield is the foriegn key in
the "Child" table.

Thanks
 
T

TC

Rob, why do you have the "personnel." prefix on the name "PersonnelID" in
the LinkMasterFields property?

The LinkMasterFields property should be set the a list of one or more
fieldnames in the recrdsource of the main form, seperated by semicolons; for
example:

ThisField

ThisField;ThatField;AnotherField

Those names should only have a prefix (like PERSONNEL.PersonnelID) if the
form is based on a query which joins several tables, and returns the same
field name (eg. PersonnelID) from more than one table. Then you need the
prefix to clearly show which field you mean.

So, what is your form based on (a table, a query or a SELECT statement)?

If it is based on a query or a SELECT statement, is the query or SELECT
statement returning the fieldname PersonbnelID from more than one table?

HTH,
TC
 
R

Rob

The form is based on a query. The primary key in my
personnel table is "personnelid". Any other table that it
is linked to has a corresponding foriegn key of the same
name. So to answer your question, yes, the query is
returning two fields of the same name.

Hope this answered your question,
Rob
 
T

TC

This is probably part of the problem. Here's how I would proceed.

(1) Temporarily modify the query to make the personnelId field appear just
once. (You could do this using AS phrases, or by SELECTing specific fields
instead of using SELECT *, or whatever).

(2) Amend the LinkMasterFields setting accordingly.

(3) See if that fixes your problem ("The LinkMasterFieldsd property setting
has produced this error: 'The object doesn't contain the Automation object
'personnel.")

If that works, you could go back to the original query, then see if you
could use brackets to avoid the problem in LinkMasterFields; maybe
[personnel].id or similar?

HTH,
TC
 
R

Rob

That did it. I used my backup data base and actually
changed any field that used "personnelID" to "persid",
except for the main personnel table which I left untouched.
Thanks alot for your help.

Rob


-----Original Message-----
This is probably part of the problem. Here's how I would proceed.

(1) Temporarily modify the query to make the personnelId field appear just
once. (You could do this using AS phrases, or by SELECTing specific fields
instead of using SELECT *, or whatever).

(2) Amend the LinkMasterFields setting accordingly.

(3) See if that fixes your problem ("The
LinkMasterFieldsd property setting
has produced this error: 'The object doesn't contain the Automation object
'personnel.")

If that works, you could go back to the original query, then see if you
could use brackets to avoid the problem in LinkMasterFields; maybe
[personnel].id or similar?

HTH,
TC


The form is based on a query. The primary key in my
personnel table is "personnelid". Any other table that it
is linked to has a corresponding foriegn key of the same
name. So to answer your question, yes, the query is
returning two fields of the same name.

Hope this answered your question,
Rob


of
one or more seperated
by semicolons; for and
returns the same more
than one table? in
to* try
to


.
 
T

TC

Well done.

TC


Rob said:
That did it. I used my backup data base and actually
changed any field that used "personnelID" to "persid",
except for the main personnel table which I left untouched.
Thanks alot for your help.

Rob


-----Original Message-----
This is probably part of the problem. Here's how I would proceed.

(1) Temporarily modify the query to make the personnelId field appear just
once. (You could do this using AS phrases, or by SELECTing specific fields
instead of using SELECT *, or whatever).

(2) Amend the LinkMasterFields setting accordingly.

(3) See if that fixes your problem ("The
LinkMasterFieldsd property setting
has produced this error: 'The object doesn't contain the Automation object
'personnel.")

If that works, you could go back to the original query, then see if you
could use brackets to avoid the problem in LinkMasterFields; maybe
[personnel].id or similar?

HTH,
TC


The form is based on a query. The primary key in my
personnel table is "personnelid". Any other table that it
is linked to has a corresponding foriegn key of the same
name. So to answer your question, yes, the query is
returning two fields of the same name.

Hope this answered your question,
Rob



-----Original Message-----
Rob, why do you have the "personnel." prefix on the
name "PersonnelID" in
the LinkMasterFields property?

The LinkMasterFields property should be set the a list of
one or more
fieldnames in the recrdsource of the main form, seperated
by semicolons; for
example:

ThisField

ThisField;ThatField;AnotherField

Those names should only have a prefix (like
PERSONNEL.PersonnelID) if the
form is based on a query which joins several tables, and
returns the same
field name (eg. PersonnelID) from more than one table.
Then you need the
prefix to clearly show which field you mean.

So, what is your form based on (a table, a query or a
SELECT statement)?

If it is based on a query or a SELECT statement, is the
query or SELECT
statement returning the fieldname PersonbnelID from more
than one table?

HTH,
TC


message
The exact things are: Masterfield: Personnel.PersonnelID
Childfield: PersonnelID
The one in the masterfield is the primary key for
the "Personnel" table.
The one in the childfield is the foriegn key in
the "Child" table.

Thanks


-----Original Message-----
You need to tell me precisely what you have *typed in
to*
the
LinkMasterFields and LinkChildFields properties of the
subform control.

Is that really:

personnel.id
child.personnelid

?

TC


message
The content of the fields are personnel.id and
child.personnelid. These are the fields that the
tables
are related with.
-----Original Message-----
What is the content of the LinkMasterFields and
LinkChildFields properties
of the relevant subform control?

Remember that LinkChildFelds is meant to be *fields*
(not
controls) in the
subform's recordsource. LinkMasterFields can be
fields
in
the main form's
recordsource, or controls in the main form.

HTH,
TC


message
I have a tabed form that has several subforms.
One of
the
subforms gives me the following error when I try
to
add
new records to it:

The LinkMasterFieldsd property setting has
produced
this
error: 'The object doesn't contain the Automation
object 'personnel."

The two table involved have a one to many
relationship
with referential integrity enforced.

The master and child forms are linked through the
personnel.id and the child.id fields.

Is there any way to get the subform to allow me to
add a
new record?

Thanks


.



.



.


.
 

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