ApplyFilter problem

  • Thread starter Thread starter PayeDoc
  • Start date Start date
P

PayeDoc

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
 
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".
 
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 said:
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 said:
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


.
 
Back
Top