How to sort query in subform

rickyfong

Registered User.
Local time
Today, 15:51
Joined
Nov 25, 2010
Messages
199
I have created a query with sorting order specified. However, when I using subform to link that query, the sorting function disappeared under subform environment!! Any idea?? Thanks!!
 
I have created a query with sorting order specified. However, when I using subform to link that query, the sorting function disappeared under subform environment!! Any idea?? Thanks!!

Ricky,
Not sure what you mean by "using subform to link that query" but....
you can set the OrderBy property in the vba. be sure to set OrderByOn = true.

so... after you change or requery the data in the subform...
add
Forms![YourMainForm]![YourSubForm].form.OrderBy = "YourCol1, YourCol2, etc..."
Forms![YourMainForm]![YourSubForm].form.OrderByOn = True
hth,
..bob
 

Users who are viewing this thread

Back
Top Bottom