Error with subform LinkMasterFields

G

Guest

This question was answered on 8/1/2004, but the answer does not work for me!

Question asked what the following means:

The LinkMasterfields property Setting has produced this error; "The
Object doesn't contain the automation object 'Account Information'.

The answer that apparently worked was

Try this in the Link Master Fields :

[Account Information.Policy Number]

In my case the main form is not "Account Information" but "Publications."
The link to the subform is the field "Pub Code."

When I use [Publications.Pub Code], I get the error

The LinkMasterfields property Setting has produced this error; "The
Object doesn't contain the automation object [Publications."

I followed Allen Browne's suggestion to turn of the Name Autocorrect
feature. It was off, so that isn't it.


Gary VDH
 
M

Marshall Barton

Gary said:
This question was answered on 8/1/2004, but the answer does not work for me!

Question asked what the following means:

The LinkMasterfields property Setting has produced this error; "The
Object doesn't contain the automation object 'Account Information'.

The answer that apparently worked was

Try this in the Link Master Fields :

[Account Information.Policy Number]

In my case the main form is not "Account Information" but "Publications."
The link to the subform is the field "Pub Code."

When I use [Publications.Pub Code], I get the error

The LinkMasterfields property Setting has produced this error; "The
Object doesn't contain the automation object [Publications."


The Link Master Fields property has to be the name of a
field in the main form's Record Source table/query OR the
name of a text box on the main form. Since there can be a
problem using a field in the record source when there is no
control bound to the field, you might as well always use a
text box name.

Your attempt has the square brackets in the wrong place.
Since you're going to use a text box name, there is no need
to disambiguate the field name. Try something like this:
txtPubCode
wbere that's the name of the text box bound to the
[Pub Code] field.
 
G

Guest

I failed to mention this, although I don't see how it is a factor:

The main form has 3 tabs, all 3 have the same primary key "Pub Code". All 3
tabs are based on one query using 3 tables, each having a 1:1 relationship.

The subform has 3 tabs. One of its 3 tabs has the primary key "Pub Code".
All 3 tabs are based on one query using 3 tables, each having a 1:1
relationship.

This setup works fine in a form for making data changes. The problem comes
in the form that is set up for data entry, only new records.

Gary VDH
 
G

Guest

I appreciate your answering my question, but I am not clear what you mean:
You said:
The Link Master Fields property has to be the name of a
field in the main form's Record Source table/query

The main form does have a field [Pub Code]. The link works on a form for
changing data,but not on a form for adding records only.

OR the
name of a text box on the main form. Since there can be a
problem using a field in the record source when there is no
control bound to the field, you might as well always use a
text box name.

The main form is saved when I move to the subform, so there is a value that
automatically fills the subform field of the same name.
Your attempt has the square brackets in the wrong place.

TABLE = Publications
FIELD = Pub Code

What do you mean by [Publications.Pub Code] has the brackets in the wrong
place??
Since you're going to use a text box name, there is no need
to disambiguate the field name. Try something like this:
txtPubCode
wbere that's the name of the text box bound to the
[Pub Code] field.

I created a text box on the main form named "txtPubCode" as you say. I
bound it to the [Pub Code] field. When I try to link Master and Child forms,
Access doesn't recognize that "txtPubCode" exists.

How am I missing your meaning? Thx

Marshall Barton said:
Gary said:
This question was answered on 8/1/2004, but the answer does not work for me!

Question asked what the following means:

The LinkMasterfields property Setting has produced this error; "The
Object doesn't contain the automation object 'Account Information'.

The answer that apparently worked was

Try this in the Link Master Fields :

[Account Information.Policy Number]

In my case the main form is not "Account Information" but "Publications."
The link to the subform is the field "Pub Code."

When I use [Publications.Pub Code], I get the error

The LinkMasterfields property Setting has produced this error; "The
Object doesn't contain the automation object [Publications."


The Link Master Fields property has to be the name of a
field in the main form's Record Source table/query OR the
name of a text box on the main form. Since there can be a
problem using a field in the record source when there is no
control bound to the field, you might as well always use a
text box name.

Your attempt has the square brackets in the wrong place.
Since you're going to use a text box name, there is no need
to disambiguate the field name. Try something like this:
txtPubCode
wbere that's the name of the text box bound to the
[Pub Code] field.
 
M

Marshall Barton

Comments inline
--
Marsh
MVP [MS Access]


Gary said:
I appreciate your answering my question, but I am not clear what you mean:
You said:
The Link Master Fields property has to be the name of a
field in the main form's Record Source table/query

The main form does have a field [Pub Code]. The link works on a form for
changing data,but not on a form for adding records only.

Fine. Then that's one way of specifying the Link Master
property, as long as there is also a text box bound to this
field.

I need more details about the subform that won't let you add
records along with the subform's record source table, its
fields and its relationship to the main form's table.

OR the

The main form is saved when I move to the subform, so there is a value that
automatically fills the subform field of the same name.

Right. That's one of the benefits of using the Link
Master/Child properties.
Your attempt has the square brackets in the wrong place.

TABLE = Publications
FIELD = Pub Code

What do you mean by [Publications.Pub Code] has the brackets in the wrong
place??

If there were a need to specify the table name (only if the
same field name occured in multiple tables in the form's
record source query), then it would be specified as
[Publications].[Pub Code]
The way you had it, Access would be looking for a field
named "Publications.Pub Code"

Since you're going to use a text box name, there is no need
to disambiguate the field name. Try something like this:
txtPubCode
wbere that's the name of the text box bound to the
[Pub Code] field.

I created a text box on the main form named "txtPubCode" as you say. I
bound it to the [Pub Code] field. When I try to link Master and Child forms,
Access doesn't recognize that "txtPubCode" exists.

That should work for the Link Master, but the Link Child
must be the name of a field in the subform's record source
table/query.

As long as you already had a main form control bound to the
link master field, you did not need to add another one.

Gary said:
This question was answered on 8/1/2004, but the answer does not work for me!

Question asked what the following means:

The LinkMasterfields property Setting has produced this error; "The
Object doesn't contain the automation object 'Account Information'.

The answer that apparently worked was

Try this in the Link Master Fields :

[Account Information.Policy Number]

In my case the main form is not "Account Information" but "Publications."
The link to the subform is the field "Pub Code."

When I use [Publications.Pub Code], I get the error

The LinkMasterfields property Setting has produced this error; "The
Object doesn't contain the automation object [Publications."
Marshall Barton said:
The Link Master Fields property has to be the name of a
field in the main form's Record Source table/query OR the
name of a text box on the main form. Since there can be a
problem using a field in the record source when there is no
control bound to the field, you might as well always use a
text box name.

Your attempt has the square brackets in the wrong place.
Since you're going to use a text box name, there is no need
to disambiguate the field name. Try something like this:
txtPubCode
wbere that's the name of the text box bound to the
[Pub Code] field.
 

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