Sorting problem

jriano

Registered User.
Local time
Today, 01:19
Joined
Dec 9, 2003
Messages
45
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
 

Users who are viewing this thread

Back
Top Bottom