set a monthly reminder using outlook (1 Viewer)

villagerz

New member
Local time
Today, 10:00
Joined
Jun 22, 2015
Messages
3
Hello everyone, newbie here.

I'm working on an access database and I need to connect that database to the reminder function of Outlook.
At first, I set the reminder precisely six months before the due date, everything was okay and the reminder worked. But after some revision required by my supervisor, I need to set the reminder based on month (not exactly on the due date), so the tasks which have due dates in the same month will be wrapped into a single reminder. The reminder also should be appear in every two weeks. Here's the code I've been worked on :
Code:
Private Sub Expired_AfterUpdate()
Dim outLookApp As Outlook.Application
Dim outLookTask As Outlook.TaskItem

Set outLookApp = CreateObject("outlook.application")
Set outLookTask = outLookApp.CreateItem(olTaskItem)

With outLookTask
    .Subject = "Reminder for Task"
    .Body = "This is a task reminder for: " & Me.Employee_Name
    .ReminderSet = True
    .Duedate = Me.Expired
    .Assign
    .ReminderTime = Me.Expired - Date < 180
    .Save
End With
MsgBox "Task has been set in Outlook succesfully", vbInformation, "Set Task Confirmed"
End Sub

I put this code on the AfterUpdate event in the column containing the due date. How should I rearrange the code so it would be able for the reminder to appear based on the month? (just consider that the reminder will be active six months before due date).
Please frankly correct me if there's something weird with my code.

Thank you in advance.
 

villagerz

New member
Local time
Today, 10:00
Joined
Jun 22, 2015
Messages
3
Cross Posted at - Stack Overflow

sorry for my carelessness. thank you for get me concerned about this :)
Honestly, I appreciate every kind of answer regarding my problem since I'm still learning from scratches. I'm sure every programmer has their own coding style, that's how I want to learn from so many different people before finally find my own coding style. Probably it's also because I'm too depressed that I cannot solve this alone, I need suggestions and learn more.

But if that's mean a violation of the rules, I will remove this thread :)

gonna delete this thread in 15 minutes..
 

pr2-eugin

Super Moderator
Local time
Today, 18:00
Joined
Nov 30, 2011
Messages
8,494
You do not have to delete this thread, just make other people aware you have posted it on the other site. So when people look at your post, they will

(a) check the other thread and see if you have got any response so they are not spending their time and effort repeating the same alternatives others have offered in other site.
(b) come up with something that might not have been covered there, so the others can also learn form this.

As it is said, it is not a violation, it is just common courtesy. Hope this helps !
 

spikepl

Eledittingent Beliped
Local time
Today, 19:00
Joined
Nov 3, 2010
Messages
6,142
DO not delete the thread - but you do need to read and actually UNDERSTAND the link pr2-eugin provided. Corssposting is a capital offence if committed without notifying the readers -is that more clear now? When crossposting provide links to crossposts.

What is

reminder to appear based on the month

Reminders have a specific date so what exactly are you desiring here?
 

Users who are viewing this thread

Top Bottom