>Barbara,
>
>I have a do case...endcase with different situations in it depending on which controls are used on the form. So if one is empty, say gcdeptno, then it is supposed to give all the records for a particular. I have a suspend just before the SQl statement to check the variables (and a couple of other things).
>
>Thanks
>Perry
What you need to do is build your WHERE clause 'on the fly', leaving out any control not needed. I've done this in a lot of areas where the user picks which values are wanted for a report.