I've got a grid control on the first tab (page) of my form that I use to select the records. I've got it set up so that I can click on the header of each column and change the sort order of that column.
What I'm wanting is when the form is first opened the grid is sorted by customer name.
SET ORDER TO customer_name ASCENDING
My code for the header is
If nShift = 2
SET ORDER TO Med_rec_id DESCENDING
ELSE
SET ORDER TO Med_rec_id ASCENDING
ENDIF
GO TOP
THISFORM.Refresh
Where is the best place for my initial sort order code to go, I'm only wanting it to sort that way when the form is first opened and retain the header sorts after the form is refreshed.
Every where I've stuck the code so far has sorted by customer when the form is opened, but will not retain the header sorts after a form refresh.
Any suggestions?
Marion
What I'm wanting is when the form is first opened the grid is sorted by customer name.
SET ORDER TO customer_name ASCENDING
My code for the header is
If nShift = 2
SET ORDER TO Med_rec_id DESCENDING
ELSE
SET ORDER TO Med_rec_id ASCENDING
ENDIF
GO TOP
THISFORM.Refresh
Where is the best place for my initial sort order code to go, I'm only wanting it to sort that way when the form is first opened and retain the header sorts after the form is refreshed.
Every where I've stuck the code so far has sorted by customer when the form is opened, but will not retain the header sorts after a form refresh.
Any suggestions?
Marion