M
mike
Hi there. Any thoughts on this would be fantastic. I have
some code that loops through a recordset and opens a form
based on the current line in the recordset, then I use
docmd to send a report that is filtered by the contents of
the form at the time, then the form closes and the process
is repeated until the end of the recordset. The problem is
that I'd really like to send my reports in adobe but I
don't know how. I think I need to replace the docmd
command with two parts: the first exports the report
that's filtered by the form to adobe format (I don't know
how to automatically do this) and, second, send the report
using the outlook object model's attachment feature. does
that sound do-able? Thanks!!
Set Db = CurrentDb
Set rs = Db.OpenRecordset("SELECT * " & _
"FROM [qryRegionManagers] " & _
"WHERE Not [Internet Address] Is Null")
If Not rs.EOF Then
Do While Not rs.EOF
DoCmd.OpenForm "frmRegionManagers",
acNormal, , "([Region]='" & rs![Region] & "')"
DoCmd.SendObject
acSendReport, "rptRegionSummaries", acFormatSNP, rs!
[Internet Address], , , "Summary", , False
DoCmd.Close acForm, "frmRegionManagers", acSaveNo
rs.MoveNext
Loop
End If
some code that loops through a recordset and opens a form
based on the current line in the recordset, then I use
docmd to send a report that is filtered by the contents of
the form at the time, then the form closes and the process
is repeated until the end of the recordset. The problem is
that I'd really like to send my reports in adobe but I
don't know how. I think I need to replace the docmd
command with two parts: the first exports the report
that's filtered by the form to adobe format (I don't know
how to automatically do this) and, second, send the report
using the outlook object model's attachment feature. does
that sound do-able? Thanks!!
Set Db = CurrentDb
Set rs = Db.OpenRecordset("SELECT * " & _
"FROM [qryRegionManagers] " & _
"WHERE Not [Internet Address] Is Null")
If Not rs.EOF Then
Do While Not rs.EOF
DoCmd.OpenForm "frmRegionManagers",
acNormal, , "([Region]='" & rs![Region] & "')"
DoCmd.SendObject
acSendReport, "rptRegionSummaries", acFormatSNP, rs!
[Internet Address], , , "Summary", , False
DoCmd.Close acForm, "frmRegionManagers", acSaveNo
rs.MoveNext
Loop
End If