Output only Last Record from a Report?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using a Form to imput data into a Table and for each Record I enter I
want to send an E-Mail of only that record. Is it possible? When I use
SendObject, I get all the Records being sent by E-Mail.
 
If you are using the form, here would be some sample code:

Me.Filter = "Idfield=" & Me.IDcontrolname
Me.FilterOn = True
DoCmd.SendObject acSendForm, Me.Name _
, , "(e-mail address removed)", , , _
"test form output", "attached is one record", True

In other words, you filter the form for the record you are
on and that is what will be output.

To show all records, make a button with the following code:

Me.FilterOn = True
Me.Requery

If you are emailing an actual report object, you can use
this code in a general module to save the filter before you
Send it

'~~~~~~~~~~~~~~~~~~~~

'------------------------------------ SetReportFilter
Sub SetReportFilter( _
byVal pReportName As String, _
byVal pFilter As String)

'Save a filter to the specified report
'You can do this before you send a report
' in an email message
'You can use this to filter subreports
' instead of putting criteria in the recordset

' USEAGE:
' example: in code that processes reports
' for viewing, printing, or email
' SetReportFilter "MyReportname","someID=1000"
' SetReportFilter "MyAppointments", _
' "City='Denver' AND dt_appt=#9/18/05#"

' written by Crystal
' Strive4peace2006 at yahoo dot com

' PARAMETERS:
' pReportName is the name of your report
' pFilter is a valid filter string

On Error GoTo SetReportFilter_error

'---------- declare variables
Dim rpt As Report

'---------- open design view of report
'---------- and set the report object variable
DoCmd.OpenReport pReportName, acViewDesign
Set rpt = Reports(pReportName)

'---------- set report filter and turn it on
rpt.Filter = pFilter
rpt.FilterOn = IIf(Len(pFilter) > 0, True, False)

'---------- save the changed report
DoCmd.Save acReport, pReportName

Exit_proc:
on error resume next
'---------- save the changed report
DoCmd.Close acReport, pReportName
'---------- Release object variable
Set rpt = Nothing

Exit Sub

SetReportFilter_error:
Resume Next

msgbox Err.Description, , _
"ERROR " & Err.Number & " SetReportFilter"
'press F8 to step thru code and fix problem
'comment next line after debugged
Stop : Resume
'next line will be the one with the error

resume Exit_proc
End Sub

'~~~~~~~~~~~~~~~~~~~~

then, here is a general function to email a report

'======================================== Email
'SendObject
'[objecttype]
'[, objectname]
'[, outputformat]
'[, to]
'[, cc]
'[, bcc]
'[, subject]
'[, messagetext]
'[, editmessage]
'[, templatefile]

'~~~~~~~~~~~~~~~~~~~~

'------------------------------------ EMailReport
Sub EMailReport( _
pReportName As String, _
pEmailAddress As String, _
pFriendlyName As String, _
pBooEditMessage As Boolean, _
pWhoFrom As String)

'Email a report to someone
'and construct the subject and message
'SNAPSHOT or RTF Format (comment one out)

'example useage:
'on the command button code to process a report
' EMailReport "rptSonglist", _
"(e-mail address removed)", _
"Original Songs from an upcoming Star", _
false, "Susan Manager"

'PARAMETERS
'pReportName --> "rptSonglist"
'pEmailAddress --> "(e-mail address removed)"
'pFriendlyName --> "Original Songs from an upcoming Star"
'pBooEditMessage --> true to edit before mail is sent
' --> false to send automatically
'pWhoFrom --> "Susan Manager"

On Error GoTo EMailReport_error
On Error Resume Next

'--------------- RTF FORMAT
DoCmd.SendObject acSendReport, _
pReportName, acFormatRTF, pEmailAddress _
, , , pFriendlyName _
& Format(Now(), " ddd m-d-yy h:nn am/pm"), _
pFriendlyName & " is attached --- " _
& "Regards, " _
& pWhoFrom, pBooEditMessage

'-------------- SNAPSHOT FORMAT -- commented out
' DoCmd.SendObject acSendReport, pReportName, _
acFormatSNP, pEmailAddress _
, , , pFriendlyName _
& Format(Now(), " ddd m-d-yy h:nn am/pm"), _
pFriendlyName & " is attached --- " _
& "Regards, " & pWhoFrom, pBooEditMessage

Exit_proc:
Exit Sub

EMailReport_error:
msgbox Err.Description, , _
"ERROR " & Err.Number & " EMailReport"
'press F8 to find problem and fix
'-- comment out next line when code is done
Stop : Resume

Resume Exit_proc
End Sub

'~~~~~~~~~~~~~~~~~~~~

Warm Regards,
Crystal
Microsoft Access MVP 2006

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)
 
Well I'm almost there. That worked to send just one record but it sends it as
a Table View. Is there anyway to just send it so it has the same look as the
Form?

strive4peace said:
If you are using the form, here would be some sample code:

Me.Filter = "Idfield=" & Me.IDcontrolname
Me.FilterOn = True
DoCmd.SendObject acSendForm, Me.Name _
, , "(e-mail address removed)", , , _
"test form output", "attached is one record", True

In other words, you filter the form for the record you are
on and that is what will be output.

To show all records, make a button with the following code:

Me.FilterOn = True
Me.Requery

If you are emailing an actual report object, you can use
this code in a general module to save the filter before you
Send it

'~~~~~~~~~~~~~~~~~~~~

'------------------------------------ SetReportFilter
Sub SetReportFilter( _
byVal pReportName As String, _
byVal pFilter As String)

'Save a filter to the specified report
'You can do this before you send a report
' in an email message
'You can use this to filter subreports
' instead of putting criteria in the recordset

' USEAGE:
' example: in code that processes reports
' for viewing, printing, or email
' SetReportFilter "MyReportname","someID=1000"
' SetReportFilter "MyAppointments", _
' "City='Denver' AND dt_appt=#9/18/05#"

' written by Crystal
' Strive4peace2006 at yahoo dot com

' PARAMETERS:
' pReportName is the name of your report
' pFilter is a valid filter string

On Error GoTo SetReportFilter_error

'---------- declare variables
Dim rpt As Report

'---------- open design view of report
'---------- and set the report object variable
DoCmd.OpenReport pReportName, acViewDesign
Set rpt = Reports(pReportName)

'---------- set report filter and turn it on
rpt.Filter = pFilter
rpt.FilterOn = IIf(Len(pFilter) > 0, True, False)

'---------- save the changed report
DoCmd.Save acReport, pReportName

Exit_proc:
on error resume next
'---------- save the changed report
DoCmd.Close acReport, pReportName
'---------- Release object variable
Set rpt = Nothing

Exit Sub

SetReportFilter_error:
Resume Next

msgbox Err.Description, , _
"ERROR " & Err.Number & " SetReportFilter"
'press F8 to step thru code and fix problem
'comment next line after debugged
Stop : Resume
'next line will be the one with the error

resume Exit_proc
End Sub

'~~~~~~~~~~~~~~~~~~~~

then, here is a general function to email a report

'======================================== Email
'SendObject
'[objecttype]
'[, objectname]
'[, outputformat]
'[, to]
'[, cc]
'[, bcc]
'[, subject]
'[, messagetext]
'[, editmessage]
'[, templatefile]

'~~~~~~~~~~~~~~~~~~~~

'------------------------------------ EMailReport
Sub EMailReport( _
pReportName As String, _
pEmailAddress As String, _
pFriendlyName As String, _
pBooEditMessage As Boolean, _
pWhoFrom As String)

'Email a report to someone
'and construct the subject and message
'SNAPSHOT or RTF Format (comment one out)

'example useage:
'on the command button code to process a report
' EMailReport "rptSonglist", _
"(e-mail address removed)", _
"Original Songs from an upcoming Star", _
false, "Susan Manager"

'PARAMETERS
'pReportName --> "rptSonglist"
'pEmailAddress --> "(e-mail address removed)"
'pFriendlyName --> "Original Songs from an upcoming Star"
'pBooEditMessage --> true to edit before mail is sent
' --> false to send automatically
'pWhoFrom --> "Susan Manager"

On Error GoTo EMailReport_error
On Error Resume Next

'--------------- RTF FORMAT
DoCmd.SendObject acSendReport, _
pReportName, acFormatRTF, pEmailAddress _
, , , pFriendlyName _
& Format(Now(), " ddd m-d-yy h:nn am/pm"), _
pFriendlyName & " is attached --- " _
& "Regards, " _
& pWhoFrom, pBooEditMessage

'-------------- SNAPSHOT FORMAT -- commented out
' DoCmd.SendObject acSendReport, pReportName, _
acFormatSNP, pEmailAddress _
, , , pFriendlyName _
& Format(Now(), " ddd m-d-yy h:nn am/pm"), _
pFriendlyName & " is attached --- " _
& "Regards, " & pWhoFrom, pBooEditMessage

Exit_proc:
Exit Sub

EMailReport_error:
msgbox Err.Description, , _
"ERROR " & Err.Number & " EMailReport"
'press F8 to find problem and fix
'-- comment out next line when code is done
Stop : Resume

Resume Exit_proc
End Sub

'~~~~~~~~~~~~~~~~~~~~

Warm Regards,
Crystal
Microsoft Access MVP 2006

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)

I am using a Form to imput data into a Table and for each Record I enter I
want to send an E-Mail of only that record. Is it possible? When I use
SendObject, I get all the Records being sent by E-Mail.
 
It would be best to use a report object if you want to be
able to control formatting.

Warm Regards,
Crystal
Microsoft Access MVP 2006

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)

Well I'm almost there. That worked to send just one record but it sends it as
a Table View. Is there anyway to just send it so it has the same look as the
Form?

:

If you are using the form, here would be some sample code:

Me.Filter = "Idfield=" & Me.IDcontrolname
Me.FilterOn = True
DoCmd.SendObject acSendForm, Me.Name _
, , "(e-mail address removed)", , , _
"test form output", "attached is one record", True

In other words, you filter the form for the record you are
on and that is what will be output.

To show all records, make a button with the following code:

Me.FilterOn = True
Me.Requery

If you are emailing an actual report object, you can use
this code in a general module to save the filter before you
Send it

'~~~~~~~~~~~~~~~~~~~~

'------------------------------------ SetReportFilter
Sub SetReportFilter( _
byVal pReportName As String, _
byVal pFilter As String)

'Save a filter to the specified report
'You can do this before you send a report
' in an email message
'You can use this to filter subreports
' instead of putting criteria in the recordset

' USEAGE:
' example: in code that processes reports
' for viewing, printing, or email
' SetReportFilter "MyReportname","someID=1000"
' SetReportFilter "MyAppointments", _
' "City='Denver' AND dt_appt=#9/18/05#"

' written by Crystal
' Strive4peace2006 at yahoo dot com

' PARAMETERS:
' pReportName is the name of your report
' pFilter is a valid filter string

On Error GoTo SetReportFilter_error

'---------- declare variables
Dim rpt As Report

'---------- open design view of report
'---------- and set the report object variable
DoCmd.OpenReport pReportName, acViewDesign
Set rpt = Reports(pReportName)

'---------- set report filter and turn it on
rpt.Filter = pFilter
rpt.FilterOn = IIf(Len(pFilter) > 0, True, False)

'---------- save the changed report
DoCmd.Save acReport, pReportName

Exit_proc:
on error resume next
'---------- save the changed report
DoCmd.Close acReport, pReportName
'---------- Release object variable
Set rpt = Nothing

Exit Sub

SetReportFilter_error:
Resume Next

msgbox Err.Description, , _
"ERROR " & Err.Number & " SetReportFilter"
'press F8 to step thru code and fix problem
'comment next line after debugged
Stop : Resume
'next line will be the one with the error

resume Exit_proc
End Sub

'~~~~~~~~~~~~~~~~~~~~

then, here is a general function to email a report

'======================================== Email
'SendObject
'[objecttype]
'[, objectname]
'[, outputformat]
'[, to]
'[, cc]
'[, bcc]
'[, subject]
'[, messagetext]
'[, editmessage]
'[, templatefile]

'~~~~~~~~~~~~~~~~~~~~

'------------------------------------ EMailReport
Sub EMailReport( _
pReportName As String, _
pEmailAddress As String, _
pFriendlyName As String, _
pBooEditMessage As Boolean, _
pWhoFrom As String)

'Email a report to someone
'and construct the subject and message
'SNAPSHOT or RTF Format (comment one out)

'example useage:
'on the command button code to process a report
' EMailReport "rptSonglist", _
"(e-mail address removed)", _
"Original Songs from an upcoming Star", _
false, "Susan Manager"

'PARAMETERS
'pReportName --> "rptSonglist"
'pEmailAddress --> "(e-mail address removed)"
'pFriendlyName --> "Original Songs from an upcoming Star"
'pBooEditMessage --> true to edit before mail is sent
' --> false to send automatically
'pWhoFrom --> "Susan Manager"

On Error GoTo EMailReport_error
On Error Resume Next

'--------------- RTF FORMAT
DoCmd.SendObject acSendReport, _
pReportName, acFormatRTF, pEmailAddress _
, , , pFriendlyName _
& Format(Now(), " ddd m-d-yy h:nn am/pm"), _
pFriendlyName & " is attached --- " _
& "Regards, " _
& pWhoFrom, pBooEditMessage

'-------------- SNAPSHOT FORMAT -- commented out
' DoCmd.SendObject acSendReport, pReportName, _
acFormatSNP, pEmailAddress _
, , , pFriendlyName _
& Format(Now(), " ddd m-d-yy h:nn am/pm"), _
pFriendlyName & " is attached --- " _
& "Regards, " & pWhoFrom, pBooEditMessage

Exit_proc:
Exit Sub

EMailReport_error:
msgbox Err.Description, , _
"ERROR " & Err.Number & " EMailReport"
'press F8 to find problem and fix
'-- comment out next line when code is done
Stop : Resume

Resume Exit_proc
End Sub

'~~~~~~~~~~~~~~~~~~~~

Warm Regards,
Crystal
Microsoft Access MVP 2006

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)

I am using a Form to imput data into a Table and for each Record I enter I
want to send an E-Mail of only that record. Is it possible? When I use
SendObject, I get all the Records being sent by E-Mail.
 
Where am I going wrong? I have a Form with a Button that the user will click
to send the Report by E-Mail that they just entered. This button triggers a
Macro that opens a Report (Safety Ball), in Print Preview using a Query in
the Filer. The Criteria for the Query is "[Record ID]=" & [Me]![Record ID]. I
have the Control (Record ID) on the Form but not on the Report. Do I need it
It would be best to use a report object if you want to be
able to control formatting.

Warm Regards,
Crystal
Microsoft Access MVP 2006

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)

Well I'm almost there. That worked to send just one record but it sends it as
a Table View. Is there anyway to just send it so it has the same look as the
Form?

:

If you are using the form, here would be some sample code:

Me.Filter = "Idfield=" & Me.IDcontrolname
Me.FilterOn = True
DoCmd.SendObject acSendForm, Me.Name _
, , "(e-mail address removed)", , , _
"test form output", "attached is one record", True

In other words, you filter the form for the record you are
on and that is what will be output.

To show all records, make a button with the following code:

Me.FilterOn = True
Me.Requery

If you are emailing an actual report object, you can use
this code in a general module to save the filter before you
Send it

'~~~~~~~~~~~~~~~~~~~~

'------------------------------------ SetReportFilter
Sub SetReportFilter( _
byVal pReportName As String, _
byVal pFilter As String)

'Save a filter to the specified report
'You can do this before you send a report
' in an email message
'You can use this to filter subreports
' instead of putting criteria in the recordset

' USEAGE:
' example: in code that processes reports
' for viewing, printing, or email
' SetReportFilter "MyReportname","someID=1000"
' SetReportFilter "MyAppointments", _
' "City='Denver' AND dt_appt=#9/18/05#"

' written by Crystal
' Strive4peace2006 at yahoo dot com

' PARAMETERS:
' pReportName is the name of your report
' pFilter is a valid filter string

On Error GoTo SetReportFilter_error

'---------- declare variables
Dim rpt As Report

'---------- open design view of report
'---------- and set the report object variable
DoCmd.OpenReport pReportName, acViewDesign
Set rpt = Reports(pReportName)

'---------- set report filter and turn it on
rpt.Filter = pFilter
rpt.FilterOn = IIf(Len(pFilter) > 0, True, False)

'---------- save the changed report
DoCmd.Save acReport, pReportName

Exit_proc:
on error resume next
'---------- save the changed report
DoCmd.Close acReport, pReportName
'---------- Release object variable
Set rpt = Nothing

Exit Sub

SetReportFilter_error:
Resume Next

msgbox Err.Description, , _
"ERROR " & Err.Number & " SetReportFilter"
'press F8 to step thru code and fix problem
'comment next line after debugged
Stop : Resume
'next line will be the one with the error

resume Exit_proc
End Sub

'~~~~~~~~~~~~~~~~~~~~

then, here is a general function to email a report

'======================================== Email
'SendObject
'[objecttype]
'[, objectname]
'[, outputformat]
'[, to]
'[, cc]
'[, bcc]
'[, subject]
'[, messagetext]
'[, editmessage]
'[, templatefile]

'~~~~~~~~~~~~~~~~~~~~

'------------------------------------ EMailReport
Sub EMailReport( _
pReportName As String, _
pEmailAddress As String, _
pFriendlyName As String, _
pBooEditMessage As Boolean, _
pWhoFrom As String)

'Email a report to someone
'and construct the subject and message
'SNAPSHOT or RTF Format (comment one out)

'example useage:
'on the command button code to process a report
' EMailReport "rptSonglist", _
"(e-mail address removed)", _
"Original Songs from an upcoming Star", _
false, "Susan Manager"

'PARAMETERS
'pReportName --> "rptSonglist"
'pEmailAddress --> "(e-mail address removed)"
'pFriendlyName --> "Original Songs from an upcoming Star"
'pBooEditMessage --> true to edit before mail is sent
' --> false to send automatically
'pWhoFrom --> "Susan Manager"

On Error GoTo EMailReport_error
On Error Resume Next

'--------------- RTF FORMAT
DoCmd.SendObject acSendReport, _
pReportName, acFormatRTF, pEmailAddress _
, , , pFriendlyName _
& Format(Now(), " ddd m-d-yy h:nn am/pm"), _
pFriendlyName & " is attached --- " _
& "Regards, " _
& pWhoFrom, pBooEditMessage

'-------------- SNAPSHOT FORMAT -- commented out
' DoCmd.SendObject acSendReport, pReportName, _
acFormatSNP, pEmailAddress _
, , , pFriendlyName _
& Format(Now(), " ddd m-d-yy h:nn am/pm"), _
pFriendlyName & " is attached --- " _
& "Regards, " & pWhoFrom, pBooEditMessage

Exit_proc:
Exit Sub

EMailReport_error:
msgbox Err.Description, , _
"ERROR " & Err.Number & " EMailReport"
'press F8 to find problem and fix
'-- comment out next line when code is done
Stop : Resume

Resume Exit_proc
End Sub

'~~~~~~~~~~~~~~~~~~~~

Warm Regards,
Crystal
Microsoft Access MVP 2006

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)


Hoopster wrote:

I am using a Form to imput data into a Table and for each Record I enter I
want to send an E-Mail of only that record. Is it possible? When I use
SendObject, I get all the Records being sent by E-Mail.
 
You said you wanted your object to have the look of a form
-- in order to accomplish that, you can set up a report that
looks like your form and use the report for output (to
email). Otherwise, you will get what you are calling the
"Table View".

For reports, IMHO, the best visual format as SNP (Snapshot
format). Other output formats include RTF and HTML.

Warm Regards,
Crystal
Microsoft Access MVP 2006

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)

Where am I going wrong? I have a Form with a Button that the user will click
to send the Report by E-Mail that they just entered. This button triggers a
Macro that opens a Report (Safety Ball), in Print Preview using a Query in
the Filer. The Criteria for the Query is "[Record ID]=" & [Me]![Record ID]. I
have the Control (Record ID) on the Form but not on the Report. Do I need it
It would be best to use a report object if you want to be
able to control formatting.

Warm Regards,
Crystal
Microsoft Access MVP 2006

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)

Well I'm almost there. That worked to send just one record but it sends it as
a Table View. Is there anyway to just send it so it has the same look as the
Form?

:



If you are using the form, here would be some sample code:

Me.Filter = "Idfield=" & Me.IDcontrolname
Me.FilterOn = True
DoCmd.SendObject acSendForm, Me.Name _
, , "(e-mail address removed)", , , _
"test form output", "attached is one record", True

In other words, you filter the form for the record you are
on and that is what will be output.

To show all records, make a button with the following code:

Me.FilterOn = True
Me.Requery

If you are emailing an actual report object, you can use
this code in a general module to save the filter before you
Send it

'~~~~~~~~~~~~~~~~~~~~

'------------------------------------ SetReportFilter
Sub SetReportFilter( _
byVal pReportName As String, _
byVal pFilter As String)

'Save a filter to the specified report
'You can do this before you send a report
' in an email message
'You can use this to filter subreports
' instead of putting criteria in the recordset

' USEAGE:
' example: in code that processes reports
' for viewing, printing, or email
' SetReportFilter "MyReportname","someID=1000"
' SetReportFilter "MyAppointments", _
' "City='Denver' AND dt_appt=#9/18/05#"

' written by Crystal
' Strive4peace2006 at yahoo dot com

' PARAMETERS:
' pReportName is the name of your report
' pFilter is a valid filter string

On Error GoTo SetReportFilter_error

'---------- declare variables
Dim rpt As Report

'---------- open design view of report
'---------- and set the report object variable
DoCmd.OpenReport pReportName, acViewDesign
Set rpt = Reports(pReportName)

'---------- set report filter and turn it on
rpt.Filter = pFilter
rpt.FilterOn = IIf(Len(pFilter) > 0, True, False)

'---------- save the changed report
DoCmd.Save acReport, pReportName

Exit_proc:
on error resume next
'---------- save the changed report
DoCmd.Close acReport, pReportName
'---------- Release object variable
Set rpt = Nothing

Exit Sub

SetReportFilter_error:
Resume Next

msgbox Err.Description, , _
"ERROR " & Err.Number & " SetReportFilter"
'press F8 to step thru code and fix problem
'comment next line after debugged
Stop : Resume
'next line will be the one with the error

resume Exit_proc
End Sub

'~~~~~~~~~~~~~~~~~~~~

then, here is a general function to email a report

'======================================== Email
'SendObject
'[objecttype]
'[, objectname]
'[, outputformat]
'[, to]
'[, cc]
'[, bcc]
'[, subject]
'[, messagetext]
'[, editmessage]
'[, templatefile]

'~~~~~~~~~~~~~~~~~~~~

'------------------------------------ EMailReport
Sub EMailReport( _
pReportName As String, _
pEmailAddress As String, _
pFriendlyName As String, _
pBooEditMessage As Boolean, _
pWhoFrom As String)

'Email a report to someone
'and construct the subject and message
'SNAPSHOT or RTF Format (comment one out)

'example useage:
'on the command button code to process a report
' EMailReport "rptSonglist", _
"(e-mail address removed)", _
"Original Songs from an upcoming Star", _
false, "Susan Manager"

'PARAMETERS
'pReportName --> "rptSonglist"
'pEmailAddress --> "(e-mail address removed)"
'pFriendlyName --> "Original Songs from an upcoming Star"
'pBooEditMessage --> true to edit before mail is sent
' --> false to send automatically
'pWhoFrom --> "Susan Manager"

On Error GoTo EMailReport_error
On Error Resume Next

'--------------- RTF FORMAT
DoCmd.SendObject acSendReport, _
pReportName, acFormatRTF, pEmailAddress _
, , , pFriendlyName _
& Format(Now(), " ddd m-d-yy h:nn am/pm"), _
pFriendlyName & " is attached --- " _
& "Regards, " _
& pWhoFrom, pBooEditMessage

'-------------- SNAPSHOT FORMAT -- commented out
' DoCmd.SendObject acSendReport, pReportName, _
acFormatSNP, pEmailAddress _
, , , pFriendlyName _
& Format(Now(), " ddd m-d-yy h:nn am/pm"), _
pFriendlyName & " is attached --- " _
& "Regards, " & pWhoFrom, pBooEditMessage

Exit_proc:
Exit Sub

EMailReport_error:
msgbox Err.Description, , _
"ERROR " & Err.Number & " EMailReport"
'press F8 to find problem and fix
'-- comment out next line when code is done
Stop : Resume

Resume Exit_proc
End Sub

'~~~~~~~~~~~~~~~~~~~~

Warm Regards,
Crystal
Microsoft Access MVP 2006

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)


Hoopster wrote:


I am using a Form to imput data into a Table and for each Record I enter I
want to send an E-Mail of only that record. Is it possible? When I use
SendObject, I get all the Records being sent by E-Mail.
 
Back
Top