Solved

Access 2007 error 2950, even in trusted area

Posted on 2012-04-09
5
1,105 Views
Last Modified: 2012-04-17
I call an Access 2007 macro with a shell command from VB6.
The macro runs fine until end when it calls a vba code module, and produces error 2950 ( 2950 is supposed to be because DB is in untrusted path).

I went into Access, and added this server folder as trusted location.

The code module that results in error 2950 is:

Function WorkPeriodHoursReport()
Dim i As Integer
On Error Resume Next
Kill "C:\RWH2\" & "MyReport" & ".pdf"
  DoCmd.OutputTo acOutputReport, "WorkPeriodHoursReport", acFormatPDF, "C:\RWH2\" & "MyReport" & ".pdf", False

'Method 1
Application.FollowHyperlink ("C:\RWH2\MyReport.pdf")

'or Method 2
Dim MyShell As Variant
'MyShell = Shell("C:\RWH2\printPDF.bat", vbMinimizedNoFocus)
End Function

Funny thing is that it worked in past!

Need fix fast for client - 500 points!
Any fix appreciated!

-Larry
0
Comment
Question by:Larry Biederman
  • 4
5 Comments
 
LVL 119

Assisted Solution

by:Rey Obrero
Rey Obrero earned 100 total points
ID: 37825490
try this setting
Office Button > access options > trust center > trust center settings > macro settings > enable all macros
0
 

Author Comment

by:Larry Biederman
ID: 37825712
I did set enable all macros.  Also added Q:\ drive as trusted area.
Doesn't work.

Thanks for input!!
0
 

Accepted Solution

by:
Larry Biederman earned 0 total points
ID: 37838963
If I "OutputTO" a blank report first, it works!
Strange.
0
 

Author Comment

by:Larry Biederman
ID: 37851813
I gave the expert 100 points for a single reply.
Although didn't fix, I ap[preciated efforts.

If moderator wants to give him all 500 points, ok.
Whatever is fair.

lbiederman
0
 

Author Closing Comment

by:Larry Biederman
ID: 37854960
Other solution didn't work.  Somehow OutputTO a report that's blank first worked.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now