column prefix does not match error

R

Roland Alden

I have a subform linked via master/child.

The subform itself works fine on a standalone basis when opened. However, in
the context of the parent, when I open the parent form, the error dialog

The column prefix 'ed-role-person-dog' does not match with a table
name or alias name used in the query.

Removing the master/child link parameters will make the problem go away at
the expense of the subform showing the entire table instead of the proper
subset.

I suspect this has to do with the process for attaching a filter to the
subform query but I can't figure out what I'm doing wrong.

For the record this is the subform query:

SELECT [ed-person].[name-family] + ', ' + [ed-person].[name-given] AS
mtxt, [ed-role-person-dog].enum, [ed-person-dog-binding].dog
FROM [ed-role-person-dog] RIGHT OUTER JOIN
[ed-person-dog-binding] ON [ed-role-person-dog].uid =
[ed-person-dog-binding].role LEFT OUTER JOIN
[ed-person] ON [ed-person-dog-binding].person =
[ed-person].uid
ORDER BY [ed-role-person-dog].enum, [ed-person].[name-family],
[ed-person].[name-given]

The master/child linkage is on [ed-person-dog-binding].dog. If I remove
[ed-role-person-dog] from the query the error shifts to
ed-person-dog-binding.
 
R

Roland Alden

I "solved" this problem by moving the query that was the datasource for the
subform into a separate query rather than having the sql embedded into the
form definition itself. Clearly this is just a(nother:) bug in Access
(2003).
 

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