I believe the question is how to Display the results. Try this.
*build your filter condition from the users input
m.so_where =" WHERE table.salesnum = 21616"
*build your SQl statement
msql = "SELECT alloy, form, pieces"
msql=msql+" FROM Database!table"
msql=msql+" NOCONSOLE INTO CURSOR tmpSales"
msql=msql+ m.so_where
msql=msql+" ORDER BY table.item"
*display your results in Grid
This.grdInq.Enabled = .T.
This.grdInq.Visible = .T.
This.grdInq.recordSource = msql
This.grdInq.Refresh()
[sig]<p>David Kirchne<br><a href=mailto:davidkirchner@yahoo.com>davidkirchner@yahoo.com</a><br>[/sig]