I am trying to implement the following procedure in an Access 2000 module with reference an Inet FTP control:
but get an error stating "Invalid use of Property" for
ict1.Cancel
I am stumped on this as I use the same code in VB6 with no problem.
Does anyone have a work around for this? The ultimate goal is to disconnect the FTP connection upon an error.
Thanks!!
JBG
Code:
Private Sub ict1_StateChanged(ByVal State As Integer)
Dim strMstrMsg As String
Select Case State
Case icNone
sbFTP.Panels(1).Text = ""
Case icResolvingHost
sbFTP.Panels(1).Text = "Resolving Host"
Case icHostResolved
sbFTP.Panels(1).Text = "Host Resolved"
Case icConnecting
sbFTP.Panels(1).Text = "Connecting..."
Case icConnected
sbFTP.Panels(1).Text = "Connected!"
Case icRequesting
sbFTP.Panels(1).Text = "Requesting..."
Case icRequestSent
sbFTP.Panels(1).Text = "Transferring..."
Case icReceivingResponse
sbFTP.Panels(1).Text = "Receiving Response..."
Case icResponseReceived
sbFTP.Panels(1).Text = "Response Received!"
Case icDisconnecting
sbFTP.Panels(1).Text = "Disconnecting..."
Case icDisconnected
sbFTP.Panels(1).Text = "Disconnected"
Case icError
sbFTP.Panels(1).Text = "Error! " & Trim(CStr(ict1.ResponseCode)) & ": " & ict1.ResponseInfo
ict1.Cancel
Case icResponseCompleted
sbFTP.Panels(1).Text = "Response Completed!"
'ReactToResponse iLastFTP
End Select
End Sub
but get an error stating "Invalid use of Property" for
ict1.Cancel
I am stumped on this as I use the same code in VB6 with no problem.
Does anyone have a work around for this? The ultimate goal is to disconnect the FTP connection upon an error.
Thanks!!
JBG