dbTalk Databases Forums  

VBA - batch file

comp.databases.ms-access comp.databases.ms-access


Discuss VBA - batch file in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #21  
Old   
bsn
 
Posts: n/a

Default Re: VBA - batch file - 05-24-2011 , 07:39 AM






"Phil" <phil (AT) stantonfamily (DOT) co.uk> skrev i en meddelelse
news:ire0t0$enk$1 (AT) speranza (DOT) aioe.org...
Quote:
On 23/05/2011 16:18:02, "bsn" wrote:

"Phil" <phil (AT) stantonfamily (DOT) co.uk> skrev i en meddelelse
news:irdpnv$ppo$1 (AT) speranza (DOT) aioe.org...
On 23/05/2011 12:54:17, "bsn" wrote:

Well if I type ?shellwait("C:\Phil Data\Access\MDB 2010\Decompile
ProgressMeter.bat",vbhide) in the immediate window, it works fine

Did ur batch file contain a FTP job, calling a scriptfile...???
Bjarne

No Just a straightforeward decompile instruction

Copy "C:\Phil Data\Access\MDB 2010\Progress Meter.accdb", "C:\Phil
Data\Access\MDB 2010\Decompile Progress Meter.accdb" "C:\Program Files
(X86)\Microsoft Office\Office14\MSACCESS.EXE" "C:\Phil Data\Access\MDB
2010\Decompile Progress Meter.accdb" /decompile

Echo "Compile DB, then compact it"

Can't see what is in the batch file should make any difference, if it runs
OK
from the desktop. If you change the "vbHide" to "vbNormalFocus", you
shouls
see the DOS box

ie ?shellwait("C:\Phil Data\Access\MDB 2010\Decompile
ProgressMeter.bat",vbNormalFocus)
I have tried this - gives the same error...
"Error starting scriptfile bufile.txt"

I think maybee its the rights to the file bufile.txt...

But I will use the fileless version...:-)
Thx for ur patience...
Bjarne

Reply With Quote
  #22  
Old   
bsn
 
Posts: n/a

Default Re: VBA - batch file - 05-24-2011 , 07:42 AM






"Stuart McCall" <smccall (AT) myunrealbox (DOT) com> skrev i en meddelelse
news:SGBCp.24830$7H.11915 (AT) newsfe08 (DOT) ams2...
Quote:
"bsn" <bsnSNABELAoncableDOTdk> wrote in message
news:4dda77bb$0$56771$edfadb0f (AT) dtext02 (DOT) news.tele.dk...

[]
Ok...
Maybee I come back to the subject later...
In the meantime I found, and use this solution - it dont depend on any
files...
FTP directly from Access...
http://www.tek-tips.com/viewthread.c...1073963&page=1

Thx a lot Phil for helping...
Bjarne

You could also give this a try. Does more than copy files, should you need
it to...

http://www.smccall.demon.co.uk/Downloads.htm#FTPClient
Thx Stuart - Ill look at it later on...
Bjarne

Reply With Quote
  #23  
Old   
Phil
 
Posts: n/a

Default Re: VBA - batch file - 05-24-2011 , 01:47 PM



On 24/05/2011 13:39:38, "bsn" wrote:
Quote:
"Phil" <phil (AT) stantonfamily (DOT) co.uk> skrev i en meddelelse
news:ire0t0$enk$1 (AT) speranza (DOT) aioe.org...
On 23/05/2011 16:18:02, "bsn" wrote:

"Phil" <phil (AT) stantonfamily (DOT) co.uk> skrev i en meddelelse
news:irdpnv$ppo$1 (AT) speranza (DOT) aioe.org...
On 23/05/2011 12:54:17, "bsn" wrote:

Well if I type ?shellwait("C:\Phil Data\Access\MDB 2010\Decompile
ProgressMeter.bat",vbhide) in the immediate window, it works fine

Did ur batch file contain a FTP job, calling a scriptfile...???
Bjarne

No Just a straightforeward decompile instruction

Copy "C:\Phil Data\Access\MDB 2010\Progress Meter.accdb", "C:\Phil
Data\Access\MDB 2010\Decompile Progress Meter.accdb" "C:\Program Files
(X86)\Microsoft Office\Office14\MSACCESS.EXE" "C:\Phil Data\Access\MDB
2010\Decompile Progress Meter.accdb" /decompile

Echo "Compile DB, then compact it"

Can't see what is in the batch file should make any difference, if it runs
OK
from the desktop. If you change the "vbHide" to "vbNormalFocus", you
shouls
see the DOS box

ie ?shellwait("C:\Phil Data\Access\MDB 2010\Decompile
ProgressMeter.bat",vbNormalFocus)

I have tried this - gives the same error...
"Error starting scriptfile bufile.txt"

I think maybee its the rights to the file bufile.txt...

But I will use the fileless version...:-)
Thx for ur patience...
Bjarne


Last thought Bjarne

Does your scriptfile use the database you are calling it from, in which case
there could be a problem. If you are, might be worth trying to run the batch
file on a copy of your Db. Otherwise, I'm stumped

Phil

Reply With Quote
  #24  
Old   
bsn
 
Posts: n/a

Default Re: VBA - batch file - 05-24-2011 , 04:42 PM



"Phil" <phil (AT) stantonfamily (DOT) co.uk> skrev i en meddelelse
news:irguff$lvm$1 (AT) speranza (DOT) aioe.org...
Quote:
On 24/05/2011 13:39:38, "bsn" wrote:

"Phil" <phil (AT) stantonfamily (DOT) co.uk> skrev i en meddelelse
news:ire0t0$enk$1 (AT) speranza (DOT) aioe.org...
On 23/05/2011 16:18:02, "bsn" wrote:

"Phil" <phil (AT) stantonfamily (DOT) co.uk> skrev i en meddelelse
news:irdpnv$ppo$1 (AT) speranza (DOT) aioe.org...
On 23/05/2011 12:54:17, "bsn" wrote:

Well if I type ?shellwait("C:\Phil Data\Access\MDB 2010\Decompile
ProgressMeter.bat",vbhide) in the immediate window, it works fine

Did ur batch file contain a FTP job, calling a scriptfile...???
Bjarne

No Just a straightforeward decompile instruction

Copy "C:\Phil Data\Access\MDB 2010\Progress Meter.accdb", "C:\Phil
Data\Access\MDB 2010\Decompile Progress Meter.accdb" "C:\Program Files
(X86)\Microsoft Office\Office14\MSACCESS.EXE" "C:\Phil Data\Access\MDB
2010\Decompile Progress Meter.accdb" /decompile

Echo "Compile DB, then compact it"

Can't see what is in the batch file should make any difference, if it
runs
OK
from the desktop. If you change the "vbHide" to "vbNormalFocus", you
shouls
see the DOS box

ie ?shellwait("C:\Phil Data\Access\MDB 2010\Decompile
ProgressMeter.bat",vbNormalFocus)

I have tried this - gives the same error...
"Error starting scriptfile bufile.txt"

I think maybee its the rights to the file bufile.txt...

But I will use the fileless version...:-)
Thx for ur patience...
Bjarne



Last thought Bjarne

Does your scriptfile use the database you are calling it from, in which
case
there could be a problem. If you are, might be worth trying to run the
batch
file on a copy of your Db. Otherwise, I'm stumped
Yes it uses the open database...
I tried to copy another database...the same error appears...
But still it works if I click on the bat file on the desktop...despite of
the database are open...
I'm stumped in the problem to - so I'm satisfied with my fileless FTP'ing...

Bjarne

Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.