I have this report, it is suposed to sort using three different fields,
but it actually sorts using only the first field, and ignores the other two. Can someone tell me why? thank you
select
tblPlanInfo.lngPSINumb,
tblPlanInfo.chrPlanLtr,
tblPlanInfo.chrPlanName,
tblPlanAccounts.lngPSINumb,
tblPlanAccounts.chrPlanLtr,
tblPlanAccounts.chrInvFirmCode,
tblPlanAccounts.chrZipPSINumb,
tblPlanAccounts.chrInvFirmType,
tblPlanAccounts.chrInvFirmFBOName,
tblPlanAccounts.chrInvFirmAcctNumb,
tblPlanAccounts.blnPSIcopied,
tblPlanInvestmentFirms.chrInvFirmCode,
tblPlanInvestmentFirms.chrZipPSINumb,
tblPlanInvestmentFirms.chrFirmName
from
(tblPlanInfo inner join tblPlanAccounts
on tblPlanInfo.lngPSINumb
= tblPlanAccounts.lngPSINumb and
tblPlanInfo.chrPlanLtr
= tblPlanAccounts.chrPlanLtr)
left join
tblPlanInvestmentFirms
on tblPlanAccounts.chrInvFirmCode
= tblPlanInvestmentFirms.chrInvFirmCode and
tblPlanAccounts.chrZipPSINumb
= tblPlanInvestmentFirms.chrZipPSINumb
where
Forms.frmRepListPlanInvAcct.optAll=True
order by
tblPlanInfo.chrPlanName asc,
tblPlanInvestmentFirms.chrFirmName asc,
tblPlanAccounts.chrInvFirmFBOName asc
but it actually sorts using only the first field, and ignores the other two. Can someone tell me why? thank you
select
tblPlanInfo.lngPSINumb,
tblPlanInfo.chrPlanLtr,
tblPlanInfo.chrPlanName,
tblPlanAccounts.lngPSINumb,
tblPlanAccounts.chrPlanLtr,
tblPlanAccounts.chrInvFirmCode,
tblPlanAccounts.chrZipPSINumb,
tblPlanAccounts.chrInvFirmType,
tblPlanAccounts.chrInvFirmFBOName,
tblPlanAccounts.chrInvFirmAcctNumb,
tblPlanAccounts.blnPSIcopied,
tblPlanInvestmentFirms.chrInvFirmCode,
tblPlanInvestmentFirms.chrZipPSINumb,
tblPlanInvestmentFirms.chrFirmName
from
(tblPlanInfo inner join tblPlanAccounts
on tblPlanInfo.lngPSINumb
= tblPlanAccounts.lngPSINumb and
tblPlanInfo.chrPlanLtr
= tblPlanAccounts.chrPlanLtr)
left join
tblPlanInvestmentFirms
on tblPlanAccounts.chrInvFirmCode
= tblPlanInvestmentFirms.chrInvFirmCode and
tblPlanAccounts.chrZipPSINumb
= tblPlanInvestmentFirms.chrZipPSINumb
where
Forms.frmRepListPlanInvAcct.optAll=True
order by
tblPlanInfo.chrPlanName asc,
tblPlanInvestmentFirms.chrFirmName asc,
tblPlanAccounts.chrInvFirmFBOName asc