Connecting Tech Pros Worldwide Help | Site Map

FTP using Access VBA?

 
LinkBack Thread Tools Search this Thread
  #1  
Old December 29th, 2007, 01:25 AM
CliffKing
Guest
 
Posts: n/a
Default FTP using Access VBA?

Hi All,

Is it possible to FTP through VBA?
Right now I manually run a batch file that calls another batch file
that just opens an FTP
server and downloads a recordeset to my local drive as a text file.
The downloaded text files are
imported into an Access Database (See example of batch files below)

Batch1.bat

open 10.243.25.034
P602176
clifking
ascii
get 'D855.LBDTR.SKF612.LBDS121E.K0001U00' C:\WKData_Gl\GenL01.txt
get 'D855.LBDTR.SKF612.LBDS121E.K0002U00' C:\WKData_Gl\GenL02.txt
get 'D855.LBDTR.SKF612.LBDS121E.K0003U00' C:\WKData_Gl\GenL03.txt
get 'D855.LBDTR.SKF612.LBDS121E.K0004U00' C:\WKData_Gl\GenL04.txt
get 'D855.LBDTR.SKF612.LBDS121E.K0005U00' C:\WKData_Gl\GenL05.txt
get 'D855.LBDTR.SKF612.LBDS121E.K0006U00' C:\WKData_Gl\GenL06.txt
quit


Batch2.bat

REM FTP CALL BATCH: Batch1.bat
ftp -s:Batch1.bat
exit


I would love to automate this process Is there a way i can achieve
this through Access VBA?


Thanks!

  #2  
Old December 29th, 2007, 02:45 AM
John Mishefske
Guest
 
Posts: n/a
Default Re: FTP using Access VBA?

CliffKing wrote:
Quote:
Is it possible to FTP through VBA?
Sure. There are lots of code samples out there. Here is one:

http://www.freevbcode.com/ShowCode.asp?ID=1593

and a lot of good leads at Randy Birch's VBnet page:

http://vbnet.mvps.org/

Some slight re-write may be needed to work in VBA.

--
'--------------------------
' John Mishefske
' UtterAccess Editor
' 2007 Microsoft MVP
'--------------------------
  #3  
Old December 29th, 2007, 04:25 AM
Baz
Guest
 
Posts: n/a
Default Re: FTP using Access VBA?

The Internet Transfer Control works OK, if you are prepared to use an
ActiveX control (which is not something to embark upon lightly if you intend
to distribute the application).

"CliffKing" <Cliff72@gmail.comwrote in message
news:4073b3a7-4790-4c69-86e3-476c430f932d@i12g2000prf.googlegroups.com...
Quote:
Hi All,
>
Is it possible to FTP through VBA?
Right now I manually run a batch file that calls another batch file
that just opens an FTP
server and downloads a recordeset to my local drive as a text file.
The downloaded text files are
imported into an Access Database (See example of batch files below)
>
Batch1.bat
>
open 10.243.25.034
P602176
clifking
ascii
get 'D855.LBDTR.SKF612.LBDS121E.K0001U00' C:\WKData_Gl\GenL01.txt
get 'D855.LBDTR.SKF612.LBDS121E.K0002U00' C:\WKData_Gl\GenL02.txt
get 'D855.LBDTR.SKF612.LBDS121E.K0003U00' C:\WKData_Gl\GenL03.txt
get 'D855.LBDTR.SKF612.LBDS121E.K0004U00' C:\WKData_Gl\GenL04.txt
get 'D855.LBDTR.SKF612.LBDS121E.K0005U00' C:\WKData_Gl\GenL05.txt
get 'D855.LBDTR.SKF612.LBDS121E.K0006U00' C:\WKData_Gl\GenL06.txt
quit
>
>
Batch2.bat
>
REM FTP CALL BATCH: Batch1.bat
ftp -s:Batch1.bat
exit
>
>
I would love to automate this process Is there a way i can achieve
this through Access VBA?
>
>
Thanks!

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.