Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't use Inet Cancel method with Access 2K

Status
Not open for further replies.

JBG

Programmer
Oct 22, 2001
99
US
I am trying to implement the following procedure in an Access 2000 module with reference an Inet FTP control:

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top