DoCmd.OutputTo error with drive mappings

  • Thread starter Thread starter Hafeez Esmail
  • Start date Start date
H

Hafeez Esmail

The front ends and Back end database files are located on
the server with the following path "\\server1\Shared Group
3\Common Databases\MyDBs\".
Users open the db via a shortcut (to the right FE) on
their desktop.
I have a form that creates and exports a query (with the
parameters of their choice) and saves the file to their
desktop. The problem I'm having is with the
DoCmd.OutputTo subroutine.
On my computer, \\server1 is mapped to the D drive. On
similar computers, there is not problem, however on
computers \\server1 is not mapped to the D drive, I get an
error and am not able to output the object.

Any help is muchly appreciated
 
Hafeez,

First of all you should have a copy of the FE on everyone's
computer and have them each link to the BE on the server.
Having them use one FE on the server all together is
defeating the purpose of having an FE. There are a ton of
problems with this and what you are running into is just one
of them.

You say you are trying to put it on their Desktop. Let's
think about the fact that you can only code one path into
this statement. Now it gets interesting as the true drive
path of every user will be different as their login name is
tied into the folder path to their Profile and their
Desktop. There is a common 'AllUsers' profile that has a
common desktop, but Win98 does not have that if that is a
problem for you. There are also some "%system%" type
variables that may be able to point you to the user's home
desktop. This is all more reasons to put the FE on each
computer so you can treat it locally.

Define/Create a location that can be common on each users
hard drive and then code the statement to that. You can
always create a shorcut to that folder from the desktop if
needed. You can't do any of the above easily until you give
them local FE's.

--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
 
Thanks for your reply Gary,

I split the DB into FEs and BE cause I want to perform
separate jobs with the same data. I wasn't sure weather
to give everyone a copy or to give them a shortcut. I
chose a shortcut, cause it requires much less space.

After going through the Access MVP site, I found a piece
of code (developed by Dev Ashish) that retrieves the
user's WINNT login id. So the path looks like this...

"C:\winnt\profiles\" & strUsrName & _
"\desktop\MyQuery.xls"

Since I don't have admin privilages, I'd have to go to
each individual and create a common area for them. They
themseves wouldn't be able to follow simple directions
(like creating a map to a network drive)

One way, I think, that would solve this probelm was if
there was a way to create (and then delete) a map to the
DB within access.

Thanks for you help Gary
Hafeez Esmail
 
Back
Top