troubleshooting Question

Problem with setting report sort order at run time

Avatar of Juan Velasquez
Juan VelasquezFlag for United States of America asked on
Microsoft Access
6 Comments1 Solution297 ViewsLast Modified:
Hello,
Below is the sql statement that is used at runtime.  I've placed this code in a query and it sorts as it is supposed to - in this case by Task Order.  Yet when I run the report, it is not being sorted by task order.  I then went ahead and created a query using the sql statement below and made it the recordsource of the report at design time.  I still had the same problem.  I've check for any groupings or sort orders that were set in the report at design time but couldn't find any.  This is an access 2007 database
SELECT qryProject.[TaskOrder], [OBS Master].OBS, [Lname] & ', '  & [Fname] AS Name, [OBS Master].Fname, [OBS Master].Lname, qryProject.[ChargeNumber], qryProject.Posted AS WeekEnding, qryProject.Workhours AS RegularHours, [FY11B]+[FY11OH] AS FY11Rate, [RegularHours]*[FY11Rate] AS RegularPay, qryProject.Overtime AS OvertimeHours, [OT11B]+[OT11OH] AS FY11otRate, [OvertimeHours]*[FY11otRate] AS OvertimePay, [OBS Master].ODC3 AS FY11odcRate, [OBS Master].Fee2 AS FY11FeeRate,[RegularPay]+[OvertimePay] AS TotalPay, [OBS Master].FY11B, [OBS Master].FY11OH, [OBS Master].OT11B, [OBS Master].OT11OH, project.Comments, project.locked, qryProject.source, [OBS Master].[Company ] FROM (Period INNER JOIN qryProject ON Period.[Week Ending] = qryProject.Posted) INNER JOIN [OBS Master] ON qryProject.OBS = [OBS Master].OBS WHERE qryProject.locked = False AND qryProject.source Like 'a' AND [Week Ending] = #4/22/2011# AND Company = 'EC' ORDER BY TaskOrder

Open in new window

ASKER CERTIFIED SOLUTION
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Database Architect / Application Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Top Expert 2007

The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros