![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Don't try an use the mda as an add-in. Simply open up your 2007 applications, and use the external data tab, click on ms-access and IMPORT the code modules from that mda. Once you do the above, then the library should work just fine in 2007... -- Albert D. Kallal * *(Access MVP) Edmonton, Alberta Canada pleaseNOOSpamKal... (AT) msn (DOT) com |
#4
| |||
| |||
|
|
Thanks Albert, I did as you suggested. However the error persists. |
#5
| |||
| |||
|
|
* *Dim f * * * As New FTP * *f.FtpURL = "ftp://www.mywebsite.com" * *f.SourceFile = "c:\abc.txt" * *f.DestinationFile = "/wwwroot/test/abc.txt" * *f.ConnectToFTPHost "my user name", "my pass word" * *f.UploadFileToFTPServer I would strongly suggest that you open up a ftp session and browse around the ftp site to ensure you get the "target" destination correct. *Just double click on my computer, and then in the address bar type in the ftp site name. then use file->login as from the menu. Often, the root dir is www, or wwwroot, or whatever, and it varies a lot by providers and how the web site directory structure is setup.. -- Albert D. Kallal * *(Access MVP) Edmonton, Alberta Canada pleaseNOOSpamKal... (AT) msn (DOT) com |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
Perhaps you try http in place of ftp? For example, the following code works for me: Sub downtest() * *Dim f * * * As New HTTP * *f.HttpURL = "http://www.mvps.org/access/downloads/InetTransferLib.zip" * *f.DestinationFile = "c:\InetTransferLib.zip" * *f.ConnectToHTTPHost * *f.WriteHTTPDataToFile End Sub Make sure the above code compiles first. I just pasted the above into a module, and it works fine for me... Using http means you have to have a valid hyperlink on the web site, and don't have to supply any logon information... -- Albert D. Kallal * *(Access MVP) Edmonton, Alberta Canada pleaseNOOSpamKal... (AT) msn (DOT) com |
#8
| |||
| |||
|
|
Pasting the above code "as is" allowed me to download InetTransferLib.zip |
|
however inserting my URL with http:// prefix still produced the error URL not found. Apparently it's a ftp site. |
|
I have access to a ftp site as well as a http site. I could probably download from the http site if I could upload to it. |
#9
| |||
| |||
|
|
I could probably download from the http site if I could upload to it. However my version of InetTransferLib did not include http upload |
#10
| |||||
| |||||
|
|
Great, the above is likely 99% of the goal here. It means you have imported the library correctly, and now have it works. Yes that is one of the goals. But how do I get a file onto my server |
|
Remember, the above code can't be placed in the existing code modules you imported. (they are class objects and thus you MUST create an instance of the object as the above code does.) |
|
As mentioned, in the above example, note careful the destination file. The ftp URL must be the base web site name, and then the destination file needs the correct path name and also the file name. |
|
The connectToFTPHost command needs your correct logon name and also your correct password. |
|
Note that the order of above 1st 3 commands is not 100% important. The last two (connect and upload) most certanly have to come in the correct order and occur after the other settings. |
![]() |
| Thread Tools | |
| Display Modes | |
| |