Why I'm getting runtime error 2501

  • Thread starter luis_a_roman via AccessMonster.com
  • Start date
L

luis_a_roman via AccessMonster.com

I'm executing the code below and when the code is executing the Docmd.
OutPutTo is abend with "Run-time Error 2501".

Function acManagerReport(acManager)
Select Case acManager
Case "mcrJar"
DoCmd.OutputTo acOutputReport, "rptProjectCharter and
SchedulebyAccountManager", "Snapshot
Format", "\\ftwgroups\JSFITCoord\acWKspace\F-35
Reports\rptWBS2000CharterANDSchedule.snp"
Case "mcrTommy"
DoCmd.OutputTo acOutputReport, "rptProjectCharter and
SchedulebyAccountManager", "Snapshot
Format", "\\ftwgroups\JSFITCoord\acWKspace\F-35
Reports\rptWBS8000_3000CharterANDSchedule.snp"
Case "mcrPat"
DoCmd.OutputTo acOutputReport, "rptProjectCharter and
SchedulebyAccountManager", "Snapshot Format", "\\ftwgroups\JSFITCoord\
acWKspace\F-35 Reports\rptWBS1400_160CharterANDSchedule.snp"
Case "mcrGary"
outputSTR = "\\ftwDoors\JSFITCoord\acWKspace\F-35 Reports\
rptWBS1100 & 5000 CharterANDSchedule.snp"
DoCmd.OutputTo acOutputReport, "rptProjectCharter and
SchedulebyAccountManager", "Snapshot Format", outputSTR
Case "mcrDavid"
DoCmd.OutputTo acOutputReport, "rptProjectCharter and
SchedulebyAccountManager", "Snapshot Format", "\\ftwgroups\JSFITCoord\
acWKspace\F-35 Reports\rptWBS6000_1000CharterANDSchedule.snp"
Case "mcrJan"
DoCmd.OutputTo acOutputReport, "rptProjectCharter and
SchedulebyAccountManager", "Snapshot Format", "\\ftwgroups\JSFITCoord\
acWKspace\F-35 Reports\rptWBS3000CharterANDSchedule.snp"
Case "mcrcsSummary"
DoCmd.OutputTo acOutputReport, "qryExecutiveSummary", "Snapshot
Format", "\\ftwgroups\JSFITCoord\acWKspace\F-35 Reports\F-35
Executive_Summary.snp"
End Select


What's confusing is that this code works in MS Access 2000. I'm executing
this code in 2007. Suggestions please.

Thank you for your collaboration.

Luis
 
P

Paolo

Hi Luis,

try setting another printer as default printer or change something in the
settings of your default printer.
Access 2007, and also 2003, if he doesn't like the settings of the printer
deny the report opening raising a 2501 error.

HTH Paolo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top