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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Sort/Order By Code

Status
Not open for further replies.

DeoM

Programmer
Jul 3, 2004
49
PH
Hi,
I have a form named "WorkOrder". I have another form where i have an option group (1) choose to sort the WorkOrder form by WorkID and (2) by CustomerName. So i figured i have to write a code in the On Open Event of the WorkOrder form". If Option=1 then sort the WorkOrder Form by WorkID; if Option=2 then sort it by CustomerName.
Please give me idea of the code i should write. Should it be an SQL Select?
Thanks.
 
Take a look at the OrderBy and OrderByOn properties of the Form object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top