The easiest way is to change the selectsommand
Property: SelectCmd
Then issue a CursorFill()call
Eg. On start your CA's SelectCmd may look like this:
select * from client where... order by name
You add this to the Click of the button:
With ThisForm.DataEnvironment.caClient
.SelectCmd = "select * from client where ... order by datecreated"
.CursorFill()
Endwith
will get a new cursor using the new select command. Of course this is just bare bones code.
Have a look at the articles section of
www.foxite.com where I have submitted 3 articles about Ca's
HTH
Bernard
>I have a button that displays a portion of a SQL server table that uses a cursor adapter to display the information. What is the best way to requery the cursor and change the order to what ever the user wants? For instance, by default the displayed info is in date order. If the user wants it in quantity order how could I have a keypress (or something similar) accomplish this?
>
>Thanks in advance
>Kelly