[AccessD] A2K: Using the shell() function

Steven W. Erbach serbach at new.rr.com
Thu Apr 29 09:52:07 CDT 2004


Dear Group,

I'm in the thick of writing a custom EDI purchase order processing application in Access 2000. The 850 purchase orders are downloaded from the VAN (Value Added Network) mailbox using Windows FTP commands in a DOS batch file, and the additional documents (855 PO Acknowledgment, 856 Advance Ship Notice, 810 Invoice, and 997 Functional Acknowledgment) are uploaded to the mailbox with another DOS batch file using Windows FTP commands.

The process works, but I've had to insert MsgBox statements in the Access code alerting the user that he should wait until the DOS batch file has completed processing the FTP commands and is closed before continuing with the Access stuff.

My question is this: do any of you lot have any techniques for 1) determining when a DOS batch file has finished (that is, the title bar of the DOS window says "Finished"); and 2) closing those windows without user intervention?

I'm just about ready to tell my client that he should buy WS_FTP Pro so that we can set up a macro or whatever you do in WS_FTP to automagically download and upload and close the WS_FTP program. I'm still not sure about what to do in Access so that it knows that an external application has completed its operations. Is this a DDE thing?

I've been experimenting with the FMS Total Visual Sourcebook that I bought some time ago. It has a class library and some sample code for logging into an FTP site and selecting and downloading files. I just know, however, that my client will balk at the additional delay while I figure out an Access-only method for getting and sending EDI documents.

The DOS batch thing works but there are the additional clicks involved with closing the DOS window and then clicking the MsgBox OK button to continue processing. Any ideas?

Regards,

Steve Erbach
Scientific Marketing
Neenah, WI
920-969-0504

"One of the differences in the two parties is that the Republicans always have problems filling many of the offices that are political, because most competent people would rather do something other than work for the government..." - Jerry Pournelle




More information about the AccessD mailing list