>Thanks it worked great, which lead me to another question regarding the ASC DESC values. I need to also sort ascending if the value in my LotOrder field is "A" and descending if the value in my LotOrder field is "D". Is the fix for this as simple as the last one?
>
>Thanks again for your help.
>
>Aloha,
>
>James
Apart from having separate SELECT - SQL statements, you can also use macro substitution.
lcOrderBy = iif(OrderByField = "D", "DESCENDING", "ASCENDING")
select ...
order by MyField &lcOrderBy
...
HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)