Max Wanadoo
max.wanadoo at gmail.com
Mon Mar 17 10:43:30 CDT 2008
Hi Gustav, No, I MUST NOT change the sequence in any way. Once it has been processed through a loop, each record will have a mailsort bagbreak inserted based on its real life position in the table. This must not change in any way from there on. No filters, no indexes etc, it must be the exact order it was in when it was processed. Thanks anyway. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Monday, March 17, 2008 2:31 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Report Data Order Differs From Form or Query DataOrder Hi Max Oh, now I see. You have to sort on something unique to obtain the exact same sort order. If the fields you wish to sort on in the report do not form a compound unique key, then include the PK in the query and pull it (invisibly) into the report and sort on that as the last field. /gustav >>> max.wanadoo at gmail.com 17-03-2008 15:18 >>> Hi Gustav, I tried various things, but the bottom line is that where there are repeating codes I am not confident that the report will pull the records in the exact same order as it did for the Form even though it "appears" to do so with the changes you suggest. So, I have added an extra field which is incremented at the same time as the codes are processed/entered and both the forms and the report now sequence on that fields - fool proof! Thanks for the feedback - much appreciated. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Monday, March 17, 2008 10:10 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Report Data Order Differs From Form or Query DataOrder Hi Max Did you use the sorting/grouping option of the _report_ and left the source unsorted: SELECT * FROM LotterySpring2008; /gustav >>> max.wanadoo at gmail.com 17-03-2008 10:52 >>> Hi Gustav, Generally I accept what you are saying. But, no matter what I do, I cannot get the report to have the same ORDER as the Form. The query is SELECT * FROM LotterySpring2008 ORDER BY LotterySpring2008.Mailsort; The Query is called qryReportDataTemp. The contents is dynamically created from code where the tablename changes based on the user requirements. The SOURCE for the Form is qryReportDataTemp The SOURCE for the Report is also qryReportDataTemp No filters, etc applied. The Form shows records in correct order. The Report does not. Even if, as you suggest, I use the sorting/grouping option and explicitly state "Mailsort" Ascending. The ORDER of the records display in the report is NOT the same ORDER as those display in the FORM or that which is shown if you open the QUERY directly. It appears to me that there is a different ENGINE driving the Report. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Monday, March 17, 2008 8:27 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Report Data Order Differs From Form or Query DataOrder Hi Max Yes, _always_ use the sorting/grouping option of the report (and leave the source unsorted) if you have a specific sorting/order need - which is true for most reports. /gustav >>> max.wanadoo at gmail.com 17-03-2008 09:20 >>> Is there a different "engine" used by the RPORT as opposed to that used by -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com