lcimmsfile=[IMMS.EI.CQIOR.IMP]+ALLT(gcSiteID)+[.OI.TXT] WAIT [Sending File to FTP] WINDOW NOWAIT *********************************************** * Setup the activeX Information *********************************************** THISFORM.oftp.HOSTNAME=ALLTRIM(THISFORM.frmip) THISFORM.oftp.UserName=ALLTRIM(THISFORM.username) THISFORM.oftp.PASSWORD=ALLTRIM(THISFORM.PASSWORD) ************************************************* * Create the FTP Connection ************************************************* success = THISFORM.oftp.CONNECT() ************************************************* * Check to see if the connection was OK, if Not message and bounce Out ************************************************* IF success=0 =MESSAGEBOX("Could not connect to Tenet IMMS FTP Server",4+64+4096,"Care Tracker Enterprise",20000) THISFORM.oftp.savexmlLog("import.xml") RETURN ENDIF WAIT [Connected....] WINDOW NOWAIT ********************************************************** * Change Directory on the FTP Site ********************************************************** THISFORM.oftp.ChangeRemoteDir("IMMSIMPORT") lcFileText='' WAIT [Attempting to Send File....] WINDOW NOWAIT ********************************************************** * Send/Put the file from the client to the FTP Site ********************************************************** thisform.oftp.putFile(ALLTRIM(thisform.frmOutFile),lcImmsFile) WAIT CLEAR ********************************************************* * Disconnect from the FTP Server ********************************************************* THISFORM.oftp.DisconnectHope this helps.