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

Access 2000 FTP

Status
Not open for further replies.

samato

Technical User
Apr 26, 2003
37
US
I want to export a text file via FTP from Access 2000. Any ideas? I see this is possible with Access XP but how about Access 2000?

Sam
 
Sam,

Try this concept. Not mine I picked it up somewhere I don't remember.

1) Create a DOS text file with your FTP commands. (e.g. OPEN [FTPSite] [UserID] [Password] PUT [textfile] QUIT)

2) Invoke the text file using the Shell command in VBA. (e.g. dblTask1 = Shell("FTP -s:" & strDOSTextFile, vbHide)

See if you can build on this concept.
 
A cleaner way of using FTP from Access would be to connect to the FTP from code and then do your transfer. Since it is in code you can use your VB code to change the file names easily.

The above can be accomplished using Windows API's. I do not have the sample code availble ATM so I suggest you search for API Guide on the web and download it. (Its a free, Windows API viewer that is much more robust than the one that comes with VB 5/6) Within API Guide search for FTP and there is a sample FTP App that you can steal the code out of. Just right a Function with the code you get and your all set.

I hope this helps you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top