>
>You may collect the string(s) and then execute, e.g.
>cFieldstring="field1,fieldx"
>cFromstring="mytable"
>cWherestring="field1='qwerty'"
>cOrderstring="2"
>Select &cFieldstring. From &cFromstring. Into Cursor mycursor Where &cWherestring. Order by &cOrderstring.
Mauricio, the approach that Edward is suggesting is a good way to go. Note that there is a 256 (?) character limit on each macro expansion. That's why it's very helpful to devide up the various parts of the syntax.
I didn't understand this work around and so I wound up writing a number of different SQL statements which I choose with a case statement. Works OK, but the approach above is better. I'll redo my search forms some day.
Peter Robinson
Peter Robinson ** Rodes Design ** Virginia