Catch sort event from form

S

Sascha Hennig

hi.

i have a form and a query. the data of the query is shown in the form in
unbounded fields in the detail area as a list. someone can select a field
(which contain a field of the query) and press the sort button of access
(descending or ascending doesn't matter). after this the data is sorted. but
i need to no, which field and how is sorted to show the same order in a
report which can be selected to show in a menu.
How can i catch the sort event from access? Or is there another way to glean
the ordering caused by the access sort button?

sascha
 
S

Sprinks

Sascha,

Perhaps someone more knowledgable about the inner workings of the Jet engine
can provide a way to capture this event, but you could also provide a custom
toolbar and a sorting method such that you control what happens, and take
appropriate action in your code.

Hope that helps.
Sprinks
 
S

Sascha Hennig

No, i mean how can i catch the event to go on in vba to store the sort order
for later use.
 
S

Sprinks

Hi, Sascha.

Sometimes its so easy you miss it. The sort criteria will be in the form's
OrderBy property.

Hope that helps.
Sprinks
 
S

Sascha Hennig

you are complete rigth. it was too easy to see, so i'd missed it completely.

thank you!
 
Top