mailing

  • Thread starter Thread starter fajita
  • Start date Start date
F

fajita

In my switchboard input form, I've pressed the mail
command button an select snapshot format, click ok.
This pops up, "The report Name 'All Past Due Action Items
by Person- Summary' you entered in either the property
sheet or macro sheet is misspelled or refers to a report
that doesn't exist."
I've checked the switchboard table there is a report with
this title the report is spelled correctly.

The VBA Form Input reads:

Private Sub Mail_Report_Click()
On Error GoTo Err_Mail_Report_Click

Dim stDocName As String

stDocName = "All Past Due Action Items by Person-
Summary" DoCmd.SendObject asReport, stDocName

Exit_Mail_Report_Click:
Exit Sub

Err_Mail_Report_Click:
MsgBox Err.Description
Resume Exit_Mail_Report_Click

End Sub

How do i delete this report that is misspelled or that
does not exist?, and continue to mail? Please help...!
 
fajita said:
In my switchboard input form, I've pressed the mail
command button an select snapshot format, click ok.
This pops up, "The report Name 'All Past Due Action Items
by Person- Summary' you entered in either the property
sheet or macro sheet is misspelled or refers to a report
that doesn't exist."
I've checked the switchboard table there is a report with
this title the report is spelled correctly.

The VBA Form Input reads:

Private Sub Mail_Report_Click()
On Error GoTo Err_Mail_Report_Click

Dim stDocName As String

stDocName = "All Past Due Action Items by Person-
Summary" DoCmd.SendObject asReport, stDocName

Exit_Mail_Report_Click:
Exit Sub

Err_Mail_Report_Click:
MsgBox Err.Description
Resume Exit_Mail_Report_Click

End Sub

How do i delete this report that is misspelled or that
does not exist?, and continue to mail? Please help...!

Is this really the exact code behind the command button? I ask, because
it is clearly invalid as it appears in your message.

These lines:
stDocName = "All Past Due Action Items by Person-
Summary" DoCmd.SendObject asReport, stDocName


should be

stDocName = "All Past Due Action Items by Person- Summary"
DoCmd.SendObject acReport, stDocName

That is, not only should the DoCmd.SendObject call be on a separate line
from the assignment to stDocName, but it should be "acReport" (or
acSendReport), not "asReport".

I can't say whether the report name you're giving us here is correct or
not. Maybe you have an extra space or too few spaces around that
hyphen.
 
Back
Top