Can anyone help?,
I am trying to run a macro in Access that will automatically send an email every Wednesday only once. I have written the following code to run the macro however I am stuck trying to automate it.
Dim MyDate, MyWeekday
MyDate = Date
MyWeekday = Weekday(MyDate, vbUseSystemDayOfWeek)
If MyWeekday = 3 Then
DoCmd.SendObject acSendReport, "Support Request Log Query", acFormatSNP, "mikeharris", , , "Pending Report", False
End If
End Sub
How would I build loop statements around this that would enable the macro to send the mail on a Wednesday only once rather than keep repeating itself over and over again on a Wednesday filling up the recipients in box. To enable the macro to run automatically would i need to name it Autoexec?
MIKE
I am trying to run a macro in Access that will automatically send an email every Wednesday only once. I have written the following code to run the macro however I am stuck trying to automate it.
Dim MyDate, MyWeekday
MyDate = Date
MyWeekday = Weekday(MyDate, vbUseSystemDayOfWeek)
If MyWeekday = 3 Then
DoCmd.SendObject acSendReport, "Support Request Log Query", acFormatSNP, "mikeharris", , , "Pending Report", False
End If
End Sub
How would I build loop statements around this that would enable the macro to send the mail on a Wednesday only once rather than keep repeating itself over and over again on a Wednesday filling up the recipients in box. To enable the macro to run automatically would i need to name it Autoexec?
MIKE