VBA to "sort"

M

Martin

I want VBA to open FORM "ABC" and sort by "field1" (fisrtly sort), "field2"
(secondly sort).

How should the VBA sentence be?

Thanks!


Martin
 
A

Allen Browne

DoCmd.OpenForm "ABC"
With Forms("ABC")
.OrderBy = "[Field1], [Field2]"
.OrderByOn = True
End With
 
Top