Hi can anyone help me in this regard. My query works fine in access but when i execute it through Data Report in vb6 the order by clause fail. The Data did't display in sort order.

here is the query..

SELECT DISTINCT PatientTbl.PatientName, PatientTbl.AGE, PatientTbl.Sex, TestMasterTbl.LabNo, TestMasterTbl.TestDate, TestMasterTbl.PatientType, TestListTbl.Test, TestListTbl.NormalRange, TestDetailTbl.Value, CategoryTbl.Category, SubCategoryTbl.SubCategory, SubCategoryTbl.SubCategoryNo, DoctorTbl.DoctorName, DepartmentTbl.Department
FROM TestListTbl INNER JOIN (((CategoryTbl INNER JOIN TestGroupMasterTbl ON CategoryTbl.CategoryNo = TestGroupMasterTbl.CategoryNo) INNER JOIN (PatientTbl INNER JOIN (DoctorTbl INNER JOIN (DepartmentTbl INNER JOIN ((ConsultantTbl INNER JOIN TestMasterTbl ON ConsultantTbl.ConsultantId = TestMasterTbl.ConsultantId) INNER JOIN (TestDetailTbl INNER JOIN TestDetailGroupTbl ON TestDetailTbl.GroupNo = TestDetailGroupTbl.GroupNo) ON (TestMasterTbl.LabNo = TestDetailGroupTbl.LabNo) AND (TestMasterTbl.LabNo = TestDetailTbl.LabNo)) ON DepartmentTbl.DepartmentId = TestMasterTbl.DepartmentId) ON DoctorTbl.DoctorId = TestMasterTbl.DoctorId) ON PatientTbl.PatientId = TestMasterTbl.PatientId) ON TestGroupMasterTbl.GroupNo = TestDetailGroupTbl.GroupNo) INNER JOIN (SubCategoryTbl INNER JOIN TestGroupDetailTbl ON SubCategoryTbl.SubCategoryNo = TestGroupDetailTbl.SubCategoryNo) ON TestGroupMasterTbl.GroupNo = TestGroupDetailTbl.GroupNo) ON (TestListTbl.TestNo = TestDetailTbl.TestNo) AND (TestListTbl.TestNo = TestGroupDetailTbl.TestNo)
WHERE (((TestMasterTbl.LabNo)=[?]))
ORDER BY SubCategoryTbl.SubCategoryNo;


Please help immediate..?
Wasim Zafar