I have a form with a bit button used for processing information.

During part of the processing I have emails sent out to our customers
with shipping information.

The last part of the code calls for a CLOSEWINDOW.

 

Since putting in the email function, the form does not close even though
I have the CLOSEWINDOW code.

The emails are sent out in a WHILE loop. Below is the while loop.

Any suggestions where I should look?

 

DECLARE c1 CURSOR FOR SELECT bolnumber FROM tshipinfocust ORDER BY
bolnumber

OPEN c1

FETCH c1 INTO vbol INDICATOR ivbol

WHILE SQLCODE <> 100 THEN

  SET VAR vfilename = ('PDFShipcust\'+.vbol+'.PDF')

  PRINT custshipinfo WHERE bolnumber = .vbol +

  OPTION PDF +

  |FILENAME &vFileName +

  |TITLE Kay Park Recreation +

  |SUBJECT Shipping Information +

  |AUTHORIZATION Shipping Department +

  |OPEN OFF

  -- Prepare Required Parameters for MAPIMail4.RBL Plugin to Send E-Mail

  SELECT emailadd INTO vto INDICATOR ivto FROM tshipinfocust WHERE
bolnumber = .vbol

  SET VAR vto = ('To:'+.vto)

  SET VAR vsubject = 'Subject:Shipment Verification'

  SET VAR vcc = ''

  SET VAR vbcc = ''

  SET VAR vbody = +

  'Body:Shipment Verification from Kay Park Recreation.!'

  SET VAR vattachments =
('Attachments:'+(CVAL('CURRDIR'))+'\'+.vfilename)

  SET VAR vsenddirect = 'SendDirect:TRUE'

  SET VAR vparameters = +

  (.vquote+.vdummy&.vpipe+.vto&.vpipe+.vsubject&.vpipe+.vcc&.vpipe+ +

  .vbcc&.vpipe+.vbody&.vpipe+.vattachments&.vpipe+.vsenddirect+.vquote)

  --CLS

  PLUGINS mapimail3.rbl &vparameters

  CLS

  FETCH c1 INTO vbol INDICATOR ivbol

ENDWHILE

DROP CURSOR c1

 

More code that drops temp tables

CLOSEWINDOW

RETURN

 

James Belisle

 

Making Information Systems People Friendly Since 1990

 

 

Reply via email to