Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Column sorting and button controls

Status
Not open for further replies.

bfrancis

Programmer
Jan 4, 2000
6
US
I would like to put a button with something like "Ascending" or "A-Z", which when clicked, performs a sort on the column below it ONLY and then hides the button and replaces it with one that says "Descending" or "Z-A". I know how to do this in Access, but am having trouble finding info about this in the FM Pro docs. BTW, I am using version 5.
 
bfrancis,
This is so old, you've probably found the solution by now. Just in case -
Set up a field, say 'Sorter' at the top of the column. Define a Global field called AscDesc or whatever.
Write a script that does, roughly, the following.
If AscDesc = 'Asc' then
sort <column field> ascending
set AscDesc = 'Desc'
set Sorter = &quot;Z-A&quot;
exit script
else
sort <column field> descending
set AscDesc = 'Asc'
set Sorter = 'A-Z'
exit script
endif
Format the field Sorter as a Button to execute the script.

[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top