Connecting Tech Pros Worldwide Help | Site Map

Copy file from within Access 2003 project

  #1  
Old November 13th, 2005, 08:17 AM
gale
Guest
 
Posts: n/a
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, 08:17 AM
Larry Linson
Guest
 
Posts: n/a

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]


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save OLE object from within Access as .otm File nspader answers 5 October 1st, 2008 03:10 PM
Specifications and Limits of Access (2000,2003) howard.canaway@gmail.com answers 4 July 3rd, 2008 08:45 AM
Importing .dat file Rnt6872 answers 22 January 25th, 2007 05:55 AM
Altering a DBF File JimmyKoolPantz answers 9 November 5th, 2006 06:15 PM