Question : The LinkMasterFields property setting has produced this error:  "The object doesn't contain the Automation object 'tbluserSpec.  "

scenario: 4 tables [tblcompSpec], [tbluserSpec], [tbllicSpec], [tbluserSoftSpec].

[tblcompSpec] has two primary keys: Asset Number & Serial Number
[tbluserspec] has one primary key: PC Name

[tblcompSpec]Primary Key Asset Number&Serial Number has 1-to-MANY relationship with [tbluserSpec] Foreign Keys Asset Number&Serial Number

[tbluserSpec]Primary Key PC Name has a 1-to-many relationship with [tbllicSpec]Foreign Key PC Name

[tbllicSpec]Foreign Key PC Name  has a relationship with [tbluserSoftSpec]Foreign Key PC Name

I run a query to create a form using tables [tblcompSpec], [tbluserSpec], [tbllicSpec] selecting * on each table and save as" qrycompUserSec

I then run a query selecting [tbluserSoftSpec] selecting * on this table to make it a subform to the above query and save as qryuserSoftSpec(this is where duplicated records reside, the bulk of my data).

when I create the first form using qrycompUserSec I am able to add records when I drag the second query [qryuserSoftSpec] to create the subform I get this
 error: The LinkMasterFields property setting has produced this error:  "The object doesn't contain the Automation object 'tblUserSpec.  "

Mind you, I'm not running procedures, macros or any manual code, I'm using the wizards, for most all forms and manually selecting my tables for queries. I've selected the fields both with the * and manually selecting them. Please be concise and clear with a solution

Gzero9

Answer : The LinkMasterFields property setting has produced this error:  "The object doesn't contain the Automation object 'tbluserSpec.  "

I second LPurvis' analysis of the problem, and the solution.

However, let me give you a little programmer's trick that should be useful in this case.

> I run a query to create a form using tables [tblcompSpec], [tbluserSpec], [tbllicSpec] selecting * on each table and save as" qrycompUserSec

That would be:

    SELECT tblcompSpec.*, tbluserSpec.*, tbllicSpec.* FROM ...

To follow the advice of aliasing fields with the same name in the tables, you would need to go...

    SELECT tblcompSpec.*, tbluserSpec.[PC Name] As UserPCName, tbluserSpec.NextField, tbluserSpec.YetAnother, .....

This removes the advantage of the *, doesn't it? Having to list all fields is a major pain and a serious maintenance issue.

Instead, do this:

    SELECT *, tbluserSpec.[PC Name] As UserPCName, tbllicSpec.[PC Name] As LicPCName FROM

The * (which is the query property "Output All Fields") will select all fields from all tables, *except* those that are selected manually. In other words, it will not pull the aliased fields again.

The .* construct, however, does pull all fields of a table, regardless of the remaining list of fields.

To make it short: Use "SELECT *" in this case, and alias only the problem fields!
(This can be done in the QBE grid, if you are not comfortable with SQL, of course)

Good Luck
Random Solutions  
 
programming4us programming4us