I have a database with some fields like, productname, productnumber, orderdate. I would like to place buttons which will sort the records. So, when I click on the button "productname" all records will be sorted by productname. I DO know what SQL statement to use but I don't know how to use buttons. Is it something like this?: WHEN button "productname"=true, DO SQLstmt = "SELECT * FROM orders ORDER BY productname"<BR><BR>Thanks in advance!<BR>Ok Impala!