Why I'm getting runtime error 2501

  • Thread starter Thread starter luis_a_roman via AccessMonster.com
  • Start date 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
 
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
 
Back
Top