[AccessD] FTP to a web site

Jim Dettman jimdettman at verizon.net
Fri Mar 31 07:01:51 CDT 2023


So there are three ways to do this in Access:

1. Construct a batch file, and then use Shell() to call it.  Personally, I
like this approach as it gives you the flexibility to use the FTP client you
want, and it's testable/debugable (you can type the commands manually on a
command line, execute the batch file, etc).  Only down side is you need an
FTP client that can handle command line arguments.

2. You can FTP using functions in the inet transfer lib in Windows.
There's code on the MVP site for this.  It's ancient, but still works last I
checked.

3. You can buy a commercial active-x control.

<<. It stopped working and he says his IT people say it needs to have a
port.>>

 It does indeed.   As a test, IT should drop the firewall(s) for a few
minutes and then see if the code works.  Traditionally, FTP uses port 21 and
20, and is based strictly on TCP.   If anything is blocking those, FTP won't
work.   If they don't want to drop the firewall, then you can test with an
FTP client, or TELNET.

 Sounds like configuration problems rather than finding a way to do FTP
differently.

Jim.


-----Original Message-----
From: AccessD On Behalf Of Rocky Smolin
Sent: Thursday, March 30, 2023 7:18 PM
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>; Off Topic <dba-ot at databaseadvisors.com>
Subject: [AccessD] FTP to a web site

Deal List(s):

I have a legacy client who needs to FTP a document to a website from an
Access front end - to a specific URL I assume.

Is there a simple way to do this with VBA? Is there a more complicated but
hopefully canned piece of code he could insert as a Public sub or function
and call it whenever he needs to send the doc?

I can send the code he's using now. It stopped working and he says his IT
people say it needs to have a port. I don't know if that's the case.  But
the code he's been using for 16 years suddenly doesn't.

MTIA

Rocky
-- 
AccessD mailing list
AccessD at databaseadvisors.com
https://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list