Inhereting the sort order

  • Thread starter Thread starter Dan St.John
  • Start date Start date
D

Dan St.John

Hello all,
I need your help.
I am running MS Access 2000.

I have a Purchase Order form that has an Order Details subform where the
user enters line items for the order. Each line item is a seperate record in
the subform, which is is Datasheet view, that is associated with the main
order. There is no sort order of the subform. The order of the records in
the subform remain in the same order that the user entered them in and they
are not re-sorted at any time.

Now my problem is that when the reoport is generated for the order - it does
not inheret the same sort order as in the Order form's subform. I want the
details section of my report to match the order of the records entered in
the Order form's subform.

The sort order of the details section of the report are actually in reverse
order compared to the form's subform sort order.

I want the Report's details section to inheret the same sort order as in the
Order form's subform.

Can you help ?

thanks



Dan
 
There is no inherent "sort order" in a table. If you say that you "see" the
table's records in the same order as when they were entered, it's either
because you have a primary key that ascends as the records are added, or
it's because of a "lucky" chance.

To get an order in a report, or in a subreport, click View | Sorting and
Grouping when in the report or subreport. That is where you define the order
for the report or subreport. Thus, if your table has a field whose value
"tells" you the order that the records were entered, and if that field is in
the RecordSource for the report or subreport, depending upon which you're
in, use that field as the sorting field.
 
Back
Top