Problem with linking child and master fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a main form and subform that are linked by a field. But when I use
the form and type in the field name in the subform, this message appears "The
LinkMasterFields property setting has produced this error: 'The object doesnt
contain the Automation object 'tbl_Data." Help!
 
Normally you shouldn't need to specify the table name as part of the
LinkChildFields property. If your parent form is based on a query which
returns two columns with the same name from two tables then the column names
in the query's result set will be qualified with the table names to
distinguish them. This more than likely would mean that one of the columns
is redundant, in which case you could remove it from the query. In a
situation where both columns are needed in the query's result set then you
can give each column a different alias. In query design view this is done by
preceding the name in the 'field' row of the column in question with the
alias followed by a colon, so you might have MyFirstID:MyID for one column
and MySecondID;My ID for the second column. In a form bound to the query
you'f then refer to each column as MyFirstID or MySecondID.
 
Thanks! That worked! You rock, Ken.

Ken Sheridan said:
Normally you shouldn't need to specify the table name as part of the
LinkChildFields property. If your parent form is based on a query which
returns two columns with the same name from two tables then the column names
in the query's result set will be qualified with the table names to
distinguish them. This more than likely would mean that one of the columns
is redundant, in which case you could remove it from the query. In a
situation where both columns are needed in the query's result set then you
can give each column a different alias. In query design view this is done by
preceding the name in the 'field' row of the column in question with the
alias followed by a colon, so you might have MyFirstID:MyID for one column
and MySecondID;My ID for the second column. In a form bound to the query
you'f then refer to each column as MyFirstID or MySecondID.
 
Back
Top