VBA to SORT (2)

  • Thread starter Thread starter Martin
  • Start date Start date
M

Martin

Thanks, Allen :)

However, I also want to know: base on ORDERBY, how to set "A to Z" and "Z
to A" ?

Thanks!

Martin


-----------------------------------------------------------------------
DoCmd.OpenForm "ABC"
With Forms("ABC")
.OrderBy = "[Field1], [Field2]"
.OrderByOn = True
End With
 
DESC causes a descending sort.

To sort on both your fields in descending order:
.OrderBy = "[Field1] DESC, [Field2] DESC"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

VBA to sort (2) 1
Query Parameter using multiple options 0
VBA to "sort" 1
What's causing error 2465? 4
two sorts VBA, how? 3
'Select Distinct' query in VBA 2
one more bug in a2K7: form order by 5
Count field 4

Back
Top