Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 19th, 2004, 08:35 AM
Authorized User
 
Join Date: Jul 2003
Location: Stockton on Tees, , United Kingdom.
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default FTP within VBA

I am trying to run a shell routine within Access VBA, to FTP download a file.
However the code that follows the shell command tries to read this new file but the download hasn't been completed.

Desirably, I would like to create a wait event until the shell is closed,
or failing this just create a delay of a fixed amount of secs.

the code is:

RetValue = Shell("c:\Program Files\WS_FTP Pro\ftpscrpt.exe -f c:\Data\script1.scp")


Thanks in advance Ray
__________________
Cheers Ray
Reply With Quote
  #2 (permalink)  
Old May 19th, 2004, 09:02 PM
Authorized User
 
Join Date: Feb 2004
Location: Edmonton, Alberta, Canada.
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Default

http://www.mvps.org/access/api/api0004.htm

Ciao
Jürgen Welz
Edmonton AB Canada
jwelz@hotmail.com
Reply With Quote
  #3 (permalink)  
Old May 20th, 2004, 02:49 AM
Authorized User
 
Join Date: Jul 2003
Location: Stockton on Tees, , United Kingdom.
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Jurgen - Great. Didn't realise it was so involved.

Cheers Ray
Reply With Quote
  #4 (permalink)  
Old May 20th, 2004, 07:54 PM
Authorized User
 
Join Date: May 2004
Location: , NH, USA.
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default

How about capturing the file size of file to be downloaded before downloading?

After the FTP download command, create a Wait Loop that just loops checking filesize until it equals the initial value captured. When the downloaded file size matches, then you continue with the rest of the code.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code works in Excel VBA but not Access VBA fossx Access VBA 2 May 21st, 2007 08:00 AM
VBA FTP k_kosaraju Access VBA 0 January 25th, 2006 11:58 AM
FTP Upload from Excel 2003 VBA Jersey Eric Excel VBA 3 January 5th, 2006 09:29 AM
FTP pakman BOOK: Excel 2003 VBA Programmer's Reference 0 June 27th, 2005 04:24 AM
Excel VBA to SQL & back to VBA edesousa Excel VBA 1 June 1st, 2004 02:39 AM



All times are GMT -4. The time now is 05:20 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.