D
doodle
windows xp
access 97
greetings all.
I have a custom form at startup with a report section. This section has
a combo box where the user selects the report from the list. There are
three command buttons, E-mail Report, Preview Report and Print Report.
E-mail Report is the problem. It works for all of the reports except
for one. This report references a parameter query, prompting the user
for a serial #.
I have other reports that reference parameter queries and they email
without issues.
The problem report actions:
1. User selects Teardown Report from the list.
2. User clicks 'E-mail Report' cmdButton
3. User is prompted for Serial #.
4. Error
It returns the following error:
Runtime error 2482
Spindle Database can't find the name 'Enter Machine Serial #' you
entered in the expression.
Troubleshoot:
1. The query runs fine on its own.
2. The report previews and prints fine.
3. The parameter query is setup identical to the ones that work.
Thanks in advance for your help.
doodle
Here is my email code:
Private Sub cmdEmail_Click()
Dim strMessage As String
Dim strSubject As String
'On Error Resume Next
strMessage = "If you cannot open the attached file, then you need to
install " _
& "the SnapShot viewer utility. It can also be downloaded from
Microsoft at: " _
& vbCrLf &
"http://support.microsoft.com/default.aspx?scid=kb;en-us;175274" _
& vbCrLf & vbCrLf & "Make a note of the folder that you save it
to.After the " _
& "download is complete, use Windows Explorer to open this folder,
and install the " _
& "viewer by double-clicking on the Snapvw.exe file."
strSubject = cmdReport
Select Case cmdReport
'Problem
Case "Teardown Report By Serial #"
DoCmd.SendObject acReport, "rptTeardownBySerialNum",
"Snapshot Format", , , , strSubject,
Case Else
MsgBox Prompt:="You must select a report to email from the
list.", Buttons:=vbOKOnly, _
Title:="Message From Adria"
End Select
[cmdReport].Value = "Pick report from list..."
End Sub
access 97
greetings all.
I have a custom form at startup with a report section. This section has
a combo box where the user selects the report from the list. There are
three command buttons, E-mail Report, Preview Report and Print Report.
E-mail Report is the problem. It works for all of the reports except
for one. This report references a parameter query, prompting the user
for a serial #.
I have other reports that reference parameter queries and they email
without issues.
The problem report actions:
1. User selects Teardown Report from the list.
2. User clicks 'E-mail Report' cmdButton
3. User is prompted for Serial #.
4. Error
It returns the following error:
Runtime error 2482
Spindle Database can't find the name 'Enter Machine Serial #' you
entered in the expression.
Troubleshoot:
1. The query runs fine on its own.
2. The report previews and prints fine.
3. The parameter query is setup identical to the ones that work.
Thanks in advance for your help.
doodle
Here is my email code:
Private Sub cmdEmail_Click()
Dim strMessage As String
Dim strSubject As String
'On Error Resume Next
strMessage = "If you cannot open the attached file, then you need to
install " _
& "the SnapShot viewer utility. It can also be downloaded from
Microsoft at: " _
& vbCrLf &
"http://support.microsoft.com/default.aspx?scid=kb;en-us;175274" _
& vbCrLf & vbCrLf & "Make a note of the folder that you save it
to.After the " _
& "download is complete, use Windows Explorer to open this folder,
and install the " _
& "viewer by double-clicking on the Snapvw.exe file."
strSubject = cmdReport
Select Case cmdReport
'Problem
Case "Teardown Report By Serial #"
DoCmd.SendObject acReport, "rptTeardownBySerialNum",
"Snapshot Format", , , , strSubject,
Case Else
MsgBox Prompt:="You must select a report to email from the
list.", Buttons:=vbOKOnly, _
Title:="Message From Adria"
End Select
[cmdReport].Value = "Pick report from list..."
End Sub