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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Error

Status
Not open for further replies.

dawnd3

Instructor
Jul 1, 2001
1,153
US
hi Everyone,

Ok, I recently installed Access 2010 and am trying to run a process that was created in Access 2003 and am getting an error now. The process is this: Basically, I click a button, and the data in one of the tables is uploaded to a local copy and then to another copy on someone's webserver via an FTP program.

I am wondering if now that I have 2010 if I am missing some library reference or something. I will give you the error and then show you the part of the code that was highlighted. Hopefully someone can offer me some insight to fix it. (P.S. I didn't write this code so that is why I am so clueless about it. I am just responsible for maintaining it.)

Runtime error 438, object doesn't support this property or method.

Here is the code: The line it is getting stuck on is
acxFTP.DisablePASV = rstFTP!ysnPASVFTP (see below)

Function fncSendDatabase()
Dim strFileName As String, strDir As String, strFilePath As String, strNewVersion As String, strUpdateFile As String
Dim rst As Recordset, strDirItem As String, strOldVersion As String, strFullVername As String
Dim rstFTP As Recordset, strUserName As String, strPassword As String, strFTPURL As String, strFTPDir As String
Dim strLocalDB As String, strWebDB As String, strWebPic As String, strLocalPic As String
Dim blnDoDownload As Boolean, dblocal As Database, strLocalFile As String
Dim appWeb As Application
'On Error GoTo err_FTP
Set dblocal = CurrentDb()
Call fncUpdateWebData
'Exit Function ' remove this later
lblFTPStatus.Caption = "Getting FTP Settings.."
' Get FTP settings
Set rstFTP = dblocal.OpenRecordset("tblFTP", dbOpenSnapshot)

strUserName = rstFTP!strLogin
strPassword = rstFTP!strPassword
strFTPURL = rstFTP!strServer
strFTPDir = rstFTP!strWebDBDir
strWebPic = rstFTP!strWebPicturesDir
strLocalDB = rstFTP!strLocalDBDir
strLocalPic = rstFTP!strLocalPicturesDir

acxFTP.DisablePASV = rstFTP!ysnPASVFTP
If Not InStr(1, rstFTP!strFTPPort, ".") > 0 Then
acxFTP.Port = rstFTP!strFTPPort
End If

rstFTP.Close

 
Here is my guess. The problem is a lot of this is taking place outside of the code provided.

acxFTP.DisablePASV = rstFTP!ysnPASVFTP

rstFTP!ysnPASVFTP
this part of the code probably returns yes or no from a field called "ysnPASVFTP" in the table "tblFTP"

The left side, "acxFTP.DisablePASV", appears to try to set the Disable Passive FTP property of the active x FTP control to the value in the field "ysnPASVFTP"

My guess is that acxFTP is a third party active x control for FTP. You need to make sure you have a reference for this control and object. It may even have some licensing issues.

In vba window hit debug and it will break on missing references.
 
Thanks MajP. I do recall having to install some FTP control. Maybe it got disabled (or now not compatible) when I installed MS Office 2010. I will check into it.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top