mailing

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...!
 
D

Dirk Goldgar

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.
 

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