send object based on query

N

Noelene

I have Microsoft Office Access 2003, Access 2000 file format.
How do I send a report to a list of clients? The report content is an
update on work done for the client over the last month and so is
contact-specific. At present a parameter query tailors the report for the
client. I want this done automatically for each contact, if there is new
information, and automatically sent to their email address. The table
tClient includes the fields Client ID (primary key), Company ID (lookup from
tCompany), FirstName, LastName and Email. The report rMRClient is run on the
query qMRClient which currently uses parameter queries on the fields
CommentDate (from the table tMonthJobComments) and Company (from the table
tCompany)
 
S

strive4peace

Hi Noelene,

when you SendObject, it's filter must already be saved...

before outputting, you have to

1. go to the design view of the report
2. set the filter
3. save it
4. THEN, do the OutputTo ...

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Report_SetReportFilter(pReportName, pFilter)
Dim rpt As Report
DoCmd.OpenReport pReportName, acViewDesign
Set rpt = Reports(pReportName)
rpt.Filter = pFilter
rpt.FilterOn = true
DoCmd.Save acReport, pReportName
DoCmd.Close acReport, pReportName
Set rpt = Nothing
End Sub
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

where
pReportName = name of report
pFilter = filter string


Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 

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