automating e-mail of invoices 
Author Message
 automating e-mail of invoices

Thanks for your reply Ken.

I'm now using the filter in the report's module(instead of
the module) but all invoices are still getting sent to
each client (theoretically).

Below is the code that I used for the report.

Private Sub Report_Open(Cancel As Integer)
Me.Filter = strInvoiceWhere 'strinvoice is the filtered
field

End Sub

Regards,

Andrew

Quote:
>-----Original Message-----
>Hi

>Two points:

>1. After applying a filter, the record count is not
>reliable (except that it will be 1 or more if matching
>records exist), to get the correct value you must fully
>populate the record set by executing a .movelast.

>2. You need to filter the recordset of the report, not
the
>form.

>Regards

>Ken Reay

>>-----Original Message-----
>>Hi there,

>>I have 1)a table called "clientdata" that contains all
of
>>our clients' e-mail addresses.(approx 180)
>>       2)a report that generates from a query that
>>produces all of our clients' invoices.(again 180)

>>By accessing the "clientdata" table I can send each
>client
>>all 180 invoices but obviously I want to send each
client
>>their invoice.

>>I tried to do it by modifying the filter function
example
>>in help (as stated below) and then looping to the next
>>client.

>>However, even though the recordcount =1 it still sends
>out
>>all invoices to each client.

>>Does anybody have any ideas?

>>Regards,

>>Andrew

>>Function filterfield(rsttemp As Recordset, _
>>    strField As String, strFilter As String) As Recordset

>>    rsttemp.Filter = strField & " = '" & strFilter & "'"
>>    Set filterfield = rsttemp.OpenRecordset

>> neword = filterfield.RecordCount

>> DoCmd.SendObject

cSendReport, "invoices", "snapshotFormat
Quote:
>>(*.snp)", recname, , , , , False, ""  
>>End Function
>>.

>.

.


Tue, 27 Apr 2004 11:48:08 GMT  
 automating e-mail of invoices
I think you also need to say

Me.Filteron = True

Regards

Ken Reay

Quote:
>-----Original Message-----
>Thanks for your reply Ken.

>I'm now using the filter in the report's module(instead
of
>the module) but all invoices are still getting sent to
>each client (theoretically).

>Below is the code that I used for the report.

>Private Sub Report_Open(Cancel As Integer)

>field

>End Sub

>Regards,

>Andrew

>>-----Original Message-----
>>Hi

>>Two points:

>>1. After applying a filter, the record count is not
>>reliable (except that it will be 1 or more if matching
>>records exist), to get the correct value you must fully
>>populate the record set by executing a .movelast.

>>2. You need to filter the recordset of the report, not
>the
>>form.

>>Regards

>>Ken Reay

>>>-----Original Message-----
>>>Hi there,

>>>I have 1)a table called "clientdata" that contains all
>of
>>>our clients' e-mail addresses.(approx 180)
>>>       2)a report that generates from a query that
>>>produces all of our clients' invoices.(again 180)

>>>By accessing the "clientdata" table I can send each
>>client
>>>all 180 invoices but obviously I want to send each
>client
>>>their invoice.

>>>I tried to do it by modifying the filter function
>example
>>>in help (as stated below) and then looping to the next
>>>client.

>>>However, even though the recordcount =1 it still sends
>>out
>>>all invoices to each client.

>>>Does anybody have any ideas?

>>>Regards,

>>>Andrew

>>>Function filterfield(rsttemp As Recordset, _
>>>    strField As String, strFilter As String) As
Recordset

>>>    rsttemp.Filter = strField & " = '" & strFilter & "'"
>>>    Set filterfield = rsttemp.OpenRecordset

>>> neword = filterfield.RecordCount

>>> DoCmd.SendObject
>cSendReport, "invoices", "snapshotFormat
>>>(*.snp)", recname, , , , , False, ""  
>>>End Function
>>>.

>>.

>..

>.



Tue, 27 Apr 2004 16:26:04 GMT  
 automating e-mail of invoices
It works !!

Thanks for your help.

Regards,

Andrew

Quote:
>-----Original Message-----
>I think you also need to say

>Me.Filteron = True

>Regards

>Ken Reay
>>-----Original Message-----
>>Thanks for your reply Ken.

>>I'm now using the filter in the report's module(instead
>of
>>the module) but all invoices are still getting sent to
>>each client (theoretically).

>>Below is the code that I used for the report.

>>Private Sub Report_Open(Cancel As Integer)

>>field

>>End Sub

>>Regards,

>>Andrew

>>>-----Original Message-----
>>>Hi

>>>Two points:

>>>1. After applying a filter, the record count is not
>>>reliable (except that it will be 1 or more if matching
>>>records exist), to get the correct value you must fully
>>>populate the record set by executing a .movelast.

>>>2. You need to filter the recordset of the report, not
>>the
>>>form.

>>>Regards

>>>Ken Reay

>>>>-----Original Message-----
>>>>Hi there,

>>>>I have 1)a table called "clientdata" that contains all
>>of
>>>>our clients' e-mail addresses.(approx 180)
>>>>       2)a report that generates from a query that
>>>>produces all of our clients' invoices.(again 180)

>>>>By accessing the "clientdata" table I can send each
>>>client
>>>>all 180 invoices but obviously I want to send each
>>client
>>>>their invoice.

>>>>I tried to do it by modifying the filter function
>>example
>>>>in help (as stated below) and then looping to the next
>>>>client.

>>>>However, even though the recordcount =1 it still sends
>>>out
>>>>all invoices to each client.

>>>>Does anybody have any ideas?

>>>>Regards,

>>>>Andrew

>>>>Function filterfield(rsttemp As Recordset, _
>>>>    strField As String, strFilter As String) As
>Recordset

>>>>    rsttemp.Filter = strField & " = '" & strFilter
& "'"
>>>>    Set filterfield = rsttemp.OpenRecordset

>>>> neword = filterfield.RecordCount

>>>> DoCmd.SendObject
>>cSendReport, "invoices", "snapshotFormat
>>>>(*.snp)", recname, , , , , False, ""  
>>>>End Function
>>>>.

>>>.

>>..

>>.

>.



Fri, 30 Apr 2004 07:11:51 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Automate E-mail of invoices

2. Automating sending mail using email adress from file

3. Automate mail using crystal mail device

4. e-mailing invoices

5. Automating Emailing Query Results

6. Automated email send on event

7. Module to automate sending of emails

8. Automated emails not reaching all recipients

9. automating query and email result

10. problem in automate eMail with picture

11. Automate Email .csv attachments

12. Automating Email - but .Send doesn't send immediately

 

 
Powered by phpBB® Forum Software