>The window name is "Printing...", not "Printed...".
>
>Also, IIF(WEXIST('Printed...'), WasReportPrinted = .T.,WasReportPrinted = .F.. is not a valid expression for On Exit.
>
>Do this instead:
>
>
>EXECSCRIPT('WasReportPrinted = WEXIST("Printing..."))
>
>
>If you're not using VFP7, you can't use EXECSCRIPT() so you'll have to put the statement in a UDF that you call from On Exit.
>
Cathy,
If the expression isn't too complex then you can use the _VFP.SetVar() to set variables and you don't have to create some outside entity to set a variable.
=iif(isnull(_VFP.SetVar('WasReportPrinted',wexist('Printing...'))),.T.,.F.)
Regards.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao