Automatically send weekly email with report

Hi there,
I have a similar project
and I am not very good at coding, If you don't mind can you share template of your access file please....
 
Hi Guys,

Based on this idea, I am building a similar function.
Instead of sending a report weekly, I would like to do it only once per month.

I am now building the check to see if the report from this month was sent already or not.

Code:
If DCount("*", "tblKpiReporting", "#" & Format([ReportDate], "mm\/yyyy") & "# = #" & Format(Now, "mm\/yyyy") & "#") > 0 Then

The ReportDate field is a Date/Time field and will be filled with Now through an SQL Insert statement whenever the report is sent.

My code keeps giving Error 13: Types don't match.

Any idea's?
 
Ok, after many failed attempts, I found another solution to my problem:

Code:
DCount("*", "tblKpiReporting", "Month([ReportDate]) = " & Month(Date()) & " And Year([ReportDate]) = " & Year(Date))

This is working fine for me.
 

Users who are viewing this thread

Back
Top Bottom