From: PayeDoc on
Hello All

I have a form with a button with the following OnClick event:
DoCmd.ApplyFilter ("qry eoys to do")

The sql of "qry eoys to do" is:
SELECT practices.[prac name], practices.[20056 EOY], Left([prac name],1) AS
initial
FROM practices
WHERE (((practices.[20056 EOY])="6") AND ((Left([prac name],1))<"c"));

When I click the button to apply the filter I get a message that the field
[prac name] could refer to more than one table listed in the FROM clause of
the sql statement ... which I really don't get at all!!

Hope someone can help.
Many thanks
Leslie Isaacs


From: Dorian on
Why do you sometimes qualify the columns and sometimes not? Maybe that is
confusing the query. Be consistent and don't qualify any or qualify them all.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".


"PayeDoc" wrote:

> Hello All
>
> I have a form with a button with the following OnClick event:
> DoCmd.ApplyFilter ("qry eoys to do")
>
> The sql of "qry eoys to do" is:
> SELECT practices.[prac name], practices.[20056 EOY], Left([prac name],1) AS
> initial
> FROM practices
> WHERE (((practices.[20056 EOY])="6") AND ((Left([prac name],1))<"c"));
>
> When I click the button to apply the filter I get a message that the field
> [prac name] could refer to more than one table listed in the FROM clause of
> the sql statement ... which I really don't get at all!!
>
> Hope someone can help.
> Many thanks
> Leslie Isaacs
>
>
> .
>
From: Leslie Isaacs on
Hello Dorian

Many thanks for your reply.

I have to confess, though, that I don't understand what you mean! When you
say that I am qualifying some of the columns but not others, do you mean
that some have a criteria set and others have no criteria set?

Sorry to appear stupid!

Thanks for your continued help.
Les

"Dorian" <Dorian(a)discussions.microsoft.com> wrote in message
news:0415FEFC-D84F-449F-B23A-D7DB9D640AAD(a)microsoft.com...
> Why do you sometimes qualify the columns and sometimes not? Maybe that is
> confusing the query. Be consistent and don't qualify any or qualify them
> all.
> -- Dorian
> "Give someone a fish and they eat for a day; teach someone to fish and
> they
> eat for a lifetime".
>
>
> "PayeDoc" wrote:
>
>> Hello All
>>
>> I have a form with a button with the following OnClick event:
>> DoCmd.ApplyFilter ("qry eoys to do")
>>
>> The sql of "qry eoys to do" is:
>> SELECT practices.[prac name], practices.[20056 EOY], Left([prac name],1)
>> AS
>> initial
>> FROM practices
>> WHERE (((practices.[20056 EOY])="6") AND ((Left([prac name],1))<"c"));
>>
>> When I click the button to apply the filter I get a message that the
>> field
>> [prac name] could refer to more than one table listed in the FROM clause
>> of
>> the sql statement ... which I really don't get at all!!
>>
>> Hope someone can help.
>> Many thanks
>> Leslie Isaacs
>>
>>
>> .
>>