Change Order By property and requery not working

  • Thread starter Thread starter Ken Smith
  • Start date Start date
K

Ken Smith

I have a continuous form displaying data that I want to
let the end user sort, based on the value of an options
frame. When the value in the frame is changed, a macro
(successfully) changes the Sort By property of the form
to the desired field name. The macro then requiries the
form, but the data remains unsorted.

Any greater gurus out there have any idea what I'm doing
wrong?

-- Thanks.
 
After you SetValue the OrderBy property of the form, did you SetValue the
OrderByOn as well?
 
Thanks, Allen, but I don't see an OrderByOn property in
the form's properties window. Where goes I to do that?
 
OrderByOn is a yes/no property that you assign at runtime.
Access does not actually the OrderBy until you set OrderByOn as well.

In your macro, you have something like this:
SetValue Forms!Form1.OrderBy [City]
The next row of the macro needs:
SetValue Forms!Form1.OrderByOn True
 
Back
Top