How to set the sort order of a report from a query

  • Thread starter Thread starter LMid
  • Start date Start date
L

LMid

Hi, I have one report which I want to display with a few differan
sort orders. I want the user to be able to choose in what order th
report should be displayed, but I don't want to create a differan
report for each order. From what I've seen an Access report ignore
any sort order given by a query. Is there a way around this

My query
select * from customer order by lastName, firstNam
or for example
select * from from customer order by zip, lastName, firstNam

Right now I am doing this in the report_open method by settin
me.recordsource equal to my sql

Any help would be appreciated
 
In design view of your report, you can select sorting and grouping from the
view menu, then select the field and sort order that you need, you can setup
this property using VBA as well by setting up properties me.orderby and
me.orderbyon, consult the help file for more details,
 
Back
Top