G
Guest
I have a small problem. The folowing code works perfectly exect in one erea.
When BASS_FTP generates an error the function jumps to "BASSREFTP_ERROR"?
as you can see, the message "That file is missing!" will be displayed. I
don't wont that message to display if the function "BASS_FTP" runs.
BASS_FTP has it own error messages.
I thought defining a 2nd error module would do it. I did not.
Ideals?
Scott Burke
Private Sub CMD_BASREFTP_Click()
On Error GoTo BASSREFTP_ERROR
Dim Fn1 As String
Dim FN1B As String
Dim Fs
Dim Fn
Rem Create the names
Fn1 = "T:\CLEARWIN\FTP\BMS\" & "PCC" & Format(Me.Date1, "YYYYMMDD") &
".TXT"
FN1B = "PCC" & Format(Me.Date1, "YYYYMMDD") & ".TXT"
Rem check for the files. dont do if
Rem file don't exist.
Set Fs = CreateObject("Scripting.fileSystemObject")
Set Fn = Fs.GetFile(Fn1)
Rem Great the file are there. Lets FTP it!
On Error GoTo BASSREFTP_ERROR2:
Call BASS_FTP(FN1B, Fn1)
BASSREFTP_ERROR:
MsgBox "That file is missing!", vbOKOnly, "RE-FTP Report"
DoCmd.Hourglass False
Exit Sub
BASSREFTP_ERROR2:
Exit Sub
End Sub
When BASS_FTP generates an error the function jumps to "BASSREFTP_ERROR"?
as you can see, the message "That file is missing!" will be displayed. I
don't wont that message to display if the function "BASS_FTP" runs.
BASS_FTP has it own error messages.
I thought defining a 2nd error module would do it. I did not.
Ideals?
Scott Burke
Private Sub CMD_BASREFTP_Click()
On Error GoTo BASSREFTP_ERROR
Dim Fn1 As String
Dim FN1B As String
Dim Fs
Dim Fn
Rem Create the names
Fn1 = "T:\CLEARWIN\FTP\BMS\" & "PCC" & Format(Me.Date1, "YYYYMMDD") &
".TXT"
FN1B = "PCC" & Format(Me.Date1, "YYYYMMDD") & ".TXT"
Rem check for the files. dont do if
Rem file don't exist.
Set Fs = CreateObject("Scripting.fileSystemObject")
Set Fn = Fs.GetFile(Fn1)
Rem Great the file are there. Lets FTP it!
On Error GoTo BASSREFTP_ERROR2:
Call BASS_FTP(FN1B, Fn1)
BASSREFTP_ERROR:
MsgBox "That file is missing!", vbOKOnly, "RE-FTP Report"
DoCmd.Hourglass False
Exit Sub
BASSREFTP_ERROR2:
Exit Sub
End Sub