PDA

View Full Version : Query Auto Correction.. HELP!!!



Ronald_yoh
04-07-2008, 03:56 PM
Anyone knows how to turn off the auto correction for query.

I have a subquery as follow:

select t1.customerid
from (select customerid from tblcust group by Custid having count(*) = 1) t1 inner join tblOrder on tblOrder.customerid = t1.customerid;

The above query works if you excute directly but when you save the above query, stupid ms access will auto correct it as follow:

select t1.customerid
from [select customerid from tblcust group by Custid having count(*) = 1]. as t1 inner join tblOrder on tblOrder.customerid = t1.customerid;

when you have the above format, you just are not able to execute it but you can't open it in design view..

Any ideas guys?

cheers
R

matthewspatrick
04-11-2008, 12:39 PM
R, I think you mean, "you are able to execute it, but you cannot see it in Design view".

Assuming that's what you meant, that behavior is by design: Access has limitations on what it is able to show in the Design view; some queries can only be edited via the SQL view. For example:



SELECT a.Field1, b.Field2
FROM TableA a INNER JOIN
TableB b ON a.Field1 Like b.Field1 & "*"


Perfectly valid SQL, and yet you will not be able to open the query in Design view, because the Query Designer does not know how to represent the join.