Connecting Tech Pros Worldwide Help | Site Map

Copy file from within Access 2003 project

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 07:17 AM
gale
Guest
 
Posts: n/a
Default Copy file from within Access 2003 project

I have an Access 2003 project. I need for users to be able to run a
report and copy the report in Excel format to a web server. The problem
is, they do not have write access to the web server. I tried to have
the Excel file saved to a public directory and then have a bat file run
(from Call Shell in Access) to copy it to the secure directory, but to
no avail. The problem is, the bat file, although located on a server,
is executed from the user's workstation thus using their security. Is
there anyway to force the bat file to run on the server or to add a
login and password to the path in the Call Shell routine? Here is the
current Call Shell:
dim strPath as String
strPath = "\\ServerName\ShareName\FileName.bat"
strPath = Chr$(34) & strPath & Chr$(34)
Call Shell(strPath, 1)


  #2  
Old November 13th, 2005, 07:17 AM
Larry Linson
Guest
 
Posts: n/a
Default Re: Copy file from within Access 2003 project

Although it is an Access Report, this is not an Access question.

As far as I know, you do have to have proper permissions to write to a
server. An alternative might be to put the file(s) in a folder that you
share and put code on the server to copy it(them) on a time-scheduled basis.
But, it'd be an appropriate question in a newsgroup about the Operating
System you run on the server.

Larry Linson
Microsoft Access MVP

"gale" <gale.rowan@ncr.com> wrote in message
news:1108049271.671001.97750@c13g2000cwb.googlegro ups.com...[color=blue]
> I have an Access 2003 project. I need for users to be able to run a
> report and copy the report in Excel format to a web server. The problem
> is, they do not have write access to the web server. I tried to have
> the Excel file saved to a public directory and then have a bat file run
> (from Call Shell in Access) to copy it to the secure directory, but to
> no avail. The problem is, the bat file, although located on a server,
> is executed from the user's workstation thus using their security. Is
> there anyway to force the bat file to run on the server or to add a
> login and password to the path in the Call Shell routine? Here is the
> current Call Shell:
> dim strPath as String
> strPath = "\\ServerName\ShareName\FileName.bat"
> strPath = Chr$(34) & strPath & Chr$(34)
> Call Shell(strPath, 1)
>[/color]


 

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,662 network members.