Let the user edit one or more records in a table (cursor) of conditions.
For each record, let the user select a) the field, b) an operator (=, >, contains (translates to "$"), in (translates to inlist()), etc.
Combine the conditions with AND.
HTH, Hilmar.
>Hi - I am just getting bogged down with the complexity of what I am trying to do and I am sure someone will have been here before...
>
>I am trying to write a routine that allows users to select records to be included in a mail merge - they may want to write to just one person, they may want to write to those clients who live is a certian postal area and the criteria goes on and on and on...
>
>I am trying to do it like a multiple choice thing at the moment and build the SQL statement based on the choices but it soon gets v. complex...
>
>Any pointers or ideas?
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)