Have a continuous form sorted

exaccess

Registered User.
Local time
Today, 19:42
Joined
Apr 21, 2013
Messages
287
Hello to All,
I have a number of continuous forms. Each form has 10 fields on it. These fields contain the basic data about each member of a club. The forms are sorted by name most of the time. Now I wish to give the capability to sort on some of the other fields by clicking on the column label at the top of the form. This can be done by making the label a toggle switch. No problem, but the recordsource of the continuous form is used later to display detail data about a member on a single form. Hence the need to modify the recordsource and underlying query. What is the best and easiest way to solve this problem?
 
"Hence huh??? the need ...to do something not defined for outsiders" Explain because that is not obvious.
 
I am not sure if this idea helps, but in some apps, I add a "sortcolumn" to the query - that is a string consist of all the fields run together in a suitable order, generated by processing a function.

so if I want the report sorted "By date, by customer" the sort field will be generated as "20140312_1234" (say)

but if I want it "by customer, by date" it gets generated as "1234_20140312"

by then sorting the form based on this single field, I can give users whichever dynamic sort they need.
 
I am not sure if this idea helps, but in some apps, I add a "sortcolumn" to the query - that is a string consist of all the fields run together in a suitable order, generated by processing a function.

so if I want the report sorted "By date, by customer" the sort field will be generated as "20140312_1234" (say)

but if I want it "by customer, by date" it gets generated as "1234_20140312"

by then sorting the form based on this single field, I can give users whichever dynamic sort they need.

A practical approach that can solve sorting problems. A few points for clarification: This dynamic sort field is a calculated column of the query which exists only during runtime and is not stored anywhere isn't it. Also this field, do you put it at the start of the query and is it visible (probably NOT)?
 

Users who are viewing this thread

Back
Top Bottom