Re: Query Problem - Query works in Query window but not as code in a f
- From: "Van T. Dinh" <VanThien.Dinh@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 25 Aug 2005 13:18:34 +1000
The " []. " notation for SubQuery / SubSQL always gets me as well. I am
reasonable with SQL but I have never been able to use this notation.
Luckily, the parentheses seem to work for me. Try replacing " [...]. " with
just "( ...)" without the dot after.
HTH
Van T. Dinh
MVP (Access)
"PatT123" <PatT123@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0F5E4019-82ED-41F2-9D73-AB20FD08EBC1@xxxxxxxxxxxxxxxx
> This Query will work as QUERY6 in the form and in the query window, but
when
> I take the code and put it into the record source of a form I get a syntax
> error in from clause. I tried the sub query with and without (). Same
> result. Can someone help?
>
>
> SELECT TBLFUNDINGTOPOS.PosNo, TBLFUNDING.Funding, TBLFUNDING.PCA,
> TBLPCA.Fund, TBLFUNDING.FedGrant_PH, TBLFUNDING.OthGrant_PH,
> TBLFUNDINGTOPOS.Percent, TBLPCA.SubProgram, TBLFUNDINGTOPOS.TotalFTE,
> CurrFTE.SumOfPercent
> FROM (TBLIndex RIGHT JOIN TBLPosition ON TBLIndex.Index =
TBLPosition.Index)
> RIGHT JOIN ((TBLFunds RIGHT JOIN TBLPCA ON TBLFunds.FUND = TBLPCA.Fund)
RIGHT
> JOIN (TBLFUNDING RIGHT JOIN (TBLFUNDINGTOPOS LEFT JOIN ([SELECT
> Sum(TBLFundingToPos.Percent) AS SumOfPercent, TBLFundingToPos.DIVFund
> FROM TBLFundingToPos
> GROUP BY TBLFundingToPos.DIVFund]. AS CurrFTE) ON TBLFUNDINGTOPOS.DIVFund
=
> CurrFTE.DIVFund) ON TBLFUNDING.Funding = TBLFUNDINGTOPOS.Funding) ON
> TBLPCA.PCA = TBLFUNDING.PCA) ON TBLPosition.PosNo = TBLFUNDINGTOPOS.PosNo;
.
- Follow-Ups:
- References:
- Prev by Date: Need help on update query in Access
- Next by Date: Re: Report structure
- Previous by thread: Query Problem - Query works in Query window but not as code in a f
- Next by thread: Re: Query Problem - Query works in Query window but not as code in
- Index(es):
Relevant Pages
|