>&& to change the printer (in addition to clearing expr, tag & tag2 from the reports) I do this >local sPrint >=Printer_Set(this.Parent.PrinterList.Value, @sPrint) && this.Parent.PrinterList.Value : combo box with selected printer > >&& print > >&& to reset the printer >=Printer_Set(sPrint) > >&& functions >*------------------------------------------------------------------------------- >function Printer_Get() > return WindowsPrinter_Get() >endfunc >*------------------------------------------------------------------------------- >function Printer_Set(PrinterNew, PrinterOld) > =WindowsPrinter_Set(PrinterNew, @PrinterOld) >endfunc >*------------------------------------------------------------------------------- >function WindowsPrinter_Get() > return set('Printer', 2) >endfunc >*------------------------------------------------------------------------------- >function WindowsPrinter_Set(PrinterNew, PrinterOld) > > local wsh, sError > sError = on('error') > PrinterOld = WindowsPrinter_Get() > do case > case lower(PrinterOld) <> lower(PrinterNew) > wsh = CreateObject('WScript.Network') > private HadError > HadError = FALSE > on error HadError = TRUE > wsh.SetDefaultPrinter(PrinterNew) > on error &sError > wsh = Null > return !HadError > endcase >endfunc >*------------------------------------------------------------------------------- >Thanks a lot for sharing this, it may help me as well, if similar problem occurs.