Okay, I've seen your database, code and query and it would appear that you didn't pick up on my statement in post #4:
Originally Posted by
boblarson
If the SQL is exactly the same, including the order by...
Since you had NO Order By clause, you cannot expect the results you expect. You may not realize this, but Access does NOT store data in the tables in any particular order. It may order them by PK when compacted but it does not care what it is that is there or where it goes. So, in order to get consistent results, you MUST apply an ORDER to the query (and for a report in the Sorting and Grouping because query sorts don't follow into the report).
So, I would suggest changing your query to look more like this:
Code:
strSQL = "SELECT WasteProfile.WPID, ScheduleMaster.Amount, ScheduleMaster.Delivery, ScheduleProfiles.ScheduleID, " _
& "ScheduleMaster.StartDate, ScheduleMaster.EndDate FROM WasteProfile INNER JOIN " _
& "(ScheduleMaster INNER JOIN ScheduleProfiles ON ScheduleMaster.ScheduleID = ScheduleProfiles.ScheduleID) " _
& "ON WasteProfile.WPID = ScheduleProfiles.WPID WHERE (((ScheduleMaster.Active)=-1)) ORDER BY WasteProfile.WPID, ScheduleMaster.StartDate, ScheduleMaster.EndDate;"
And then check to see if it is working correctly.