OutputTo Problems

  • Thread starter Thread starter Leo Rincic
  • Start date Start date
L

Leo Rincic

Hi all,

I have a secured database, FE-BE solution, developed in MS Access 2000 in
production. I want to offer all the users the ability to store reports in
RTF format and am trying to use OutputTo method to save the reports on disk.
The source queries for the reports are executed with owner's permissions and
all the users can open and print the reports.
The OutputTo works however only under the single developer (admin) account
and the same account is also listed as the owner of the report (and most of
the other objects as well). Under any of the other accounts, OutputTo fails
with MSAccess error #2587: "<database_name> can't complete the output
operation". The interface for this is implemented via the toolbar assigned
to the reports. Toolbar item executes a macro with RunCode calling a
function with DoCmd.OutputTo ...

Any help appreciated. Thanks,
Leo
 
Leo:

Have you tried giving users group read design permissions on the report in
the Security Administrator? If so, what other permissions does the Users
group currently have on the report(s)?
 
Hi Steve,

Thanks for answering!
There are no permissions assigned to the default Users group, of course. And
it has no members.
I have several defined groups with varying permissions. All users have read
design on (all) reports but even the super-users (all permissions on report
except administering) cannot run the OutputTo code.
The code works only for the actual OWNER of the report objects (the Admins
group is NOT the owner!).
I've even tried programmatically changing the current user as the owner of
the report before the "output" code line and back after it but without any
effect.
 
Hi Steve,

Thanks for answering!
There are no permissions assigned to the default Users group, of course. And
it has no members.
I have several defined groups with varying permissions. All users have read
design on (all) reports but even the super-users (all permissions on report
except administering) cannot run the OutputTo code.
The code works only for the actual OWNER of the report objects (the Admins
group is NOT the owner!).
I've even tried programmatically changing the current user as the owner of
the report before the "output" code line and back after it but without any
effect.
 
Leo:

Ok, I'll have to try out what you've got to see if I can replicate what you
are seeing. But in the mean time, here's a thought you might try In
Access 2000 and above, Access and VBA run in differnt process spaces. It
may be that Access isn't infering appropriate rights when the VBA method is
called.

On the otherhand, macros run in the Access user's process space. What
happens if you create a macro that uses the OutputTo action, specifying a
fixed file location, then in VBA, call the RunMacro method and use the
FileCopy or Name methods to move the file from the macro's fixed output
locaton to the target location? Does that work?
 
I'll definitely try it out - I really need to figure this out because the
formatting of the reports is elementary, so RTF is fine, and the users
prefer the Word over PDF for archiving - thanks Steve:)
 
I'm afraid it doesn't work, Steve.
The macro fails and I get the same MSAcess error message (2587), details of
which, BTW, I cannot find anywhere in MSDN.
The situation is that this works under developer/owner account only. Other
accounts should have almost the same permissions on the involved objects and
I think that the OWNERSHIP is the only difference - I'm testing with another
"admin-like" account. All users have indirect permissions (via their
groups).

It'll be interesting if you would reproduce this behaviour.

On another matter, would you know of anyone in the "community" with
experience related to Access running on Unicode systems? I've posted my
problem a couple of times but noone seems interested. The application
running fine on Latin-based systems has problems in Russia & China.

Thanks again,
Leo
 
Leo:

Fresh out of quick possible solutions. This is something I'd have to play
with and if I come up with something in the next couple of days I'll post it
here. Please do the same yourself. Have you done a google search on
OutputTo and permissions? This can't be the first time this has been
encountered.
 
OK.
I found a couple of suggestions in the meantime on http://www.tek-tips.com
but regarding Access XP. Supposedly, references to Windows Common Controls
6.0 and Script Host Object Model might be interfering and I'm using
Scripting myself... - I'll check that out

Thanks again for your efforts - much appreciated:)

Leo
 
Leo:

Please post back if you find that either of those issues turned out to be a
problem. I had time to run a test an FE/BE scenario with the BE table set
so that users only had read data (and read design) permissions, with the FE
query set in the same manner (read data / read design) with owner access
option and the report set for general users to have Open / Run permissions
only. The owner of all objects was not the Admin Group, but was an admins
group member (note that the table owner/query owner and report owner were
all assigned to the the same Admin level log on.). The Admins group itself
had the same permissions as the Users; only the particular admin user had
ownership of the objects.

With that scenario, I could not replicate the error you described outputting
to RTF either to both a local drive and to a network drive. I added a ref
to Windows scripting host and that did not cause the error either.
 
Back
Top