>>SELECT cn_name, cn_port, cn_printer FROM lcontrol ;
> WHERE !EMPTY(lcontrol.cn_name) .and. lcontrol.cn_name IN ;
> (SELECT ctrlname FROM ctrlset WHERE ctrlset.printform = .T.);
> INTO TABLE (hdir+"tTEMPLCONTROL.DBF")
>
Tracy,
I'm not convinced this will solve your problem, but as a matter of good practice I always surround the condition that contains a ! operator with parenthesis (i.e. WHERE (! EMPTY(lControl.cn_name)) ). The reason I do this is because I explicitly don't want the expression evaluated incorrectly if there are multiple conditions joined with AND/OR (i.e. the ! reversing both conditions instead of just the first).
Hope that made sense. :)
Laterness,
Jon
Jon Rosenbaum
Devcon Drummer