Change Order By property and requery not working

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.
 
A

Allen Browne

After you SetValue the OrderBy property of the form, did you SetValue the
OrderByOn as well?
 
K

Ken Smith

Thanks, Allen, but I don't see an OrderByOn property in
the form's properties window. Where goes I to do that?
 
A

Allen Browne

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
 

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

Top