i have been running into some ftp problems. when i run the ftp, the
log indicates that it has been ftp'd.
here is my ftp log:
USER XX
PASS XXX
CONNECT XXX.dns.com
CD $1$DKB101:[USBCERT_REPORTS]
GET PROD6-06-09-04-299-2 C:\TEMP\PROD.txt 0
CD $1$DKA101:[USBMABS_REPORTS]
GET PROD6-06-09-04-299-2 C:\TEMP\PRODUSBMABS.txt 0
however i look in the c:\temp directory and cannot find the two files.
can anyone tell me what is wrong
with the below code and why it does not ftp to the c:\temp directory?
the Forms![frmFTPData]![txtDatabase] and
Forms![frmFTPData]![txtReportName] needs to have a value. if it
does not have values, then it should exit out of the if statement. the
[txtDatabase] is important because
it tells which report is from which database name.
thanks in advance- jung.
If Forms![frmFTPData]![txtDatabase] <> "" And
Forms![frmFTPData]![txtReportName] <> "" Then
strSQL = "INSERT INTO [tblFTPText] ( [Text String] ) SELECT 'CD
$1$DKB101:[USBCERT_REPORTS]' AS Expr1;"
Set qdf = db.CreateQueryDef("", strSQL)
qdf.Execute
'Insert Name of file to retrieve and name and location to save as
strSQL = "INSERT INTO [tblFTPText] ( [Text String] ) SELECT 'GET "
& Forms![frmFTPData]![txtReportName].Value & " " &
Forms![frmFTPData]![txtSavedDataLocation].Value & "PROD.txt 0'"
strSQL = strSQL & " AS Expr1;"
Set qdf = db.CreateQueryDef("", strSQL)
qdf.Execute
End If
If Forms![frmFTPData]![txtDatabase] <> "" And
Forms![frmFTPData]![txtReportName] <> "" Then
strSQL = "INSERT INTO [tblFTPText] ( [Text String] ) SELECT 'CD
$1$DKA101:[USBMABS_REPORTS]' AS Expr1;"
Set qdf = db.CreateQueryDef("", strSQL)
qdf.Execute
'Insert Name of file to retrieve and name and location to save as
strSQL = "INSERT INTO [tblFTPText] ( [Text String] ) SELECT 'GET "
& Forms![frmFTPData]![txtReportName].Value & " " &
Forms![frmFTPData]![txtSavedDataLocation].Value & "PRODUSBMABS.txt 0'"
strSQL = strSQL & " AS Expr1;"
Set qdf = db.CreateQueryDef("", strSQL)
qdf.Execute
End If
'copy script file to ftp directory
DoCmd.TransferText acExportDelim, "myftp", "tblFTPText",
"c:\temp\bmftp.txt", False, ""
'ftp files
Call ShellWait("C:\bm_ref\ftpbm.bat", 1)
'C:\PROGRA~1\WS_FTP~1\FTPSCRPT c:\temp\bmftp.txt