473,836 Members | 1,423 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automated Mail Delivery Time Using Table Data

21 New Member
Good Day,
I have an access database
I want to be able to send a reminder email to myself every 3 months
So basicall when today date vs last update date in my table > 30
Then automically send email
At the moment i am using the deferred delivery time method..
But i would prefer a way to calculate the difference between todays date vs last update date in my table and if >30.
Then today's date is passed a s the parameter for the deferred delivery time
Dec 5 '11 #1
20 3849
32,584 Recognized Expert Moderator MVP
So, what have you got already?

What do you want help with?

Why would you want to set a deferred date if that is the same date as you run the code?

There's a hint of a question here but it's not very clear. I seem to recall deleting a/some questions from you already with instructions to make more sense, so I'm guessing this is the best you can do. We're good with honest attempts, but you need to answer these three questions to allow us to help you formulate a sensible question that we can help with.
Dec 5 '11 #2
21 New Member
Thanks for the reply NeoPa
The main aim of having a deffered date is that i want a reminder email to be generated every 3 months without any inut from me to remind to update sections of my database
What i really wan
The deffered date is not the same date i run the code
The code is going to run continually everyday
But what i really want is that that i set a date as a benchmark and 30 days adter that benchamrk date, the reminder mail is sent out to me. and then the benchamrk date is refereshed and set to the day the emial was sent out and another 30 days countdown begins.
I tried using the deffered delivery method and just settin ti 30 days from now but this dosent work because it would mean that i would have to continoulsy go back and edit the deferred delivery time again to the next 30 days which totallydefeats the whole purpose of automation
I am sorry if my earlier post was not very understandable
Thanks for all your help
Dec 5 '11 #3
32,584 Recognized Expert Moderator MVP
Elak, when your question doesn't make sense it's often because you don't focus on the problem very clearly. In that case, it often helps if someone, who is able to think more clearly, posts some questions for you to answer, as the answers to those questions often clarify the question (Indeed, the questions are chosen specifically for that purpose). That makes it very important that you answer those questions as well as you can. Further explanations without the questions answered, is frankly not very likely to be of much help (As in this case) as if you were able to explain it clearly one would assume you'd have done it originally.

I suggest then, answering the questions would be the first thing you do after reading this post.

There are more things to consider, but without that basic question sorted out my explanations will make little sense I suspect.
Dec 5 '11 #4
32,584 Recognized Expert Moderator MVP
Some more things to consider (but not at the expense of answering those questions) :
  1. Presumably we're talking about Outlook here. There is no item I know of which sends an email every 30 days, so this cannot be set up once and left to run automatically without code.
  2. One consideration should be recurring appointments. An Outlook Appointment can be set up to remind you every 30 days. Set it once and it will continue working forever. No work or code required after that. It's what I'd do in your situation (or at least as much of your situation that has been explained).
  3. Assuming that's not a viable solution then let's look at what might be :
    1. If the code is run every day (so the Access database is opened by you every working day) then what is the benefit of setting up the email in advance? It would surely be easy (if only in your understanding of it) to determine the dates within Access and send an email when the 30th day has been reached (or passed if you allow for weekends or holidays).
    2. Alternatively, you could set up some code, triggered by a specific Command Button on a specific form, which sets up an email deferred for 30 days, and you only ever run this process on the day you read the previously sent email.

Does that about sum things up?

Think about all these and say where you think you're heading.

PS. Don't forget to read all posts since you last posted, and not just the one at the end. Sometimes more than one post are there to be read.
Dec 5 '11 #5
21 New Member
Dear Neopa,
I appreciate the fact that you are not getting paid for this service and you are doing all of us a favour. I do know it can be very frustrating when you are trying to help people and sometimes their question just contain too much dilly-dallying and not getting straight to the point but some of your comments in post 4 were quite hurtful.
I guess it's my fault cuz i went in to much detail thinking it would aid the whole process
I just wanted an access vba to send out an email reminder every 30 days automatically..
So far i have been able to send out emails automatically from access and also been able to specify the date and times i want the email sent using the deferred delivery time in access vba
My problem presently is creating a reoccurring reminder every 30 days..i don't know how to go about this
Thanks for all the help you have given to me
Dec 5 '11 #6
32,584 Recognized Expert Moderator MVP
but some of your comments in post 4 were quite hurtful.
I don't have very long hair (Less than 1cm) yet I still find myself trying to pull it out. Luckily I can't get a good grip.

I think I'd settle for a little hurtful if only I could get you to pay attention to what I'm saying. Because I'm self-opinionated? Vain? Full of myself? All possibles, but in fact no. Because I think I can help you, but every time I post anything that isn't what you want/expect to see, you seem to avoid seeing it (and just ignore it). I have already included in my posts so far what I think are answers to your actual problem, but because you are trundling along with your mind closed you haven't seen them. You certainly haven't yet (even now) answered any of the three questions in post #2. Is that better manners than my being a little hurtful?

Whether or not, I am actually sorry you feel hurt (and, by inference, that I caused that hurt). Normally I find people who take that much kicking to pay attention, are pretty thick-skinned. I only wanted to get you to start thinking and getting more involved in what is, after all, your own question thread.

My problem presently is creating a reoccurring reminder every 30 days..i don't know how to go about this
As I've already addressed this point in one of my earlier posts I would suggest you read back through the thread again for yourself. You might find more there than you realise. If, after that, you still need more help, then all I ask is that you engage with me in the discussion. I pay attention to all you post. I simply ask that you do me the same courtesy. I'm confident under those circumstances I can express all that I know on the subject and thus be a lot more help to you.

PS. I am sometimes considered abrasive, and I often post very directly. However, my intention is not to be hurtful and I will take more care with you particularly in future.
Dec 5 '11 #7
21 New Member
Hi NeoPa

Thanks for your reply and I am sorry if my earlier post offended you.
I finally understand what you mean more clearly
I think the frustration of the code not working out was clouding my thinking and do I apologize for any inconveniences I have caused you and i really appreciate all your help

I did read your post and you suggested you using an outlook reminder without code
Let me give you a background about that the database, hopefully this would help you understand my questions better
I am creating a database on behalf of some managers who do not have any access expertise at all
The database is going to be a shared one
I could create a reminder via outlook but that would mean that I have to set it up on each mangers pc, which is not viable

To answer your questions.
What have I got already: I am able to send out emails to all managers by clicking a command button/or by running a code on my form
I also incorporated (.DeferredDeliv eryTime), this was so as to enable me to run the code at a specific time..I now realize that this is not a very wise method to use

What do I want help with: I want to be able to set up a way to send out emails to all managers automatically every 3 months..I know that for this to occur their outlook and the database needs to be open for the code to run..
In you earlier post you suggested:
the code is run every day (so the Access database is opened by you every working day) then what is the benefit of setting up the email in advance? It would surely be easy (if only in your understanding of it) to determine the dates within Access and send an email when the 3 month period has elapsed
This is what I had in mind initially and I have set the dates but my problem is after the 3 month period has elapsed, how do I refresh and start another 3 month period countdown after the first one has elapsed
I am aiming for this whole process to be automated because the managers who will have no knowledge of access and so cant make any changes to the database

An clip/snapshot of the code I have:
Expand|Select|Wrap|Line Numbers
  1. .Subject = "Testing Automation"
  2. .Body = "this might work and so could this"
  3. .DeferredDeliveryTime = Me.NextUpdate
  4. .DeleteAfterSubmit = True  'Deletes message after it has been sent, so that no record is present in your access folder
The Next Update is just a textbox on my form that I put in the date of the next update which is in 3 months, so for example I put in March 06 2012
My problem is I don’t want to manually put in the date, I just want the computer to count a 3 month period and on the last day of that period, send the email ,and from that days onwards another 3 month countdown begins.

You also suggested an alternative method of setting up an email which is deferred for 30 days and the process is only ran on the days the previously sent email is read.. How do I go about implementing this?

Hopefully this explains everything better and sorry for making you try to pull out your hair :(
Dec 6 '11 #8
32,584 Recognized Expert Moderator MVP
Where do I start? Let me start by saying Hello Elak6 :-) It's so nice to meet the real you at last. And may I add a little impressive. I was hoping for something I could start working with productively, but what I see is far more than that. Fully engaged at an intelligent level. I hope that together we can illustrate how much you can benefit from the different approach.

I wasn't offended by anything you said. Frustrated at times yes, but there was no offense. I never saw anything that indicated you were attempting to be rude or abusive. Your last post made up for all that though anyway.

Back to your question :

It seems to me that either of the last two options (Send with defer, or wait and send) would still suit your purposes as long as you could determine when to trigger the process again without duplicating any of the emails. I believe the first step to understanding this is to maintain a table in your database which contains the date of the last email sent (or the Deferred Send Date if that option is preferred). Every day, when you open the database, it should check this field (which I'll call [SendDate] for reference) and determine what to do based on the value :
Expand|Select|Wrap|Line Numbers
  1. Status of Date()   Send Now Option  Send Deferred Option
  2. <[SendDate]        Nothing          Nothing
  3. =[SendDate]        Process A        Nothing
  4. >[SendDate]        Nothing          Process B
Process A
  • Update [SendDate] by 30 days.
  • Send e-mails to all recipients (No deferral).
Process B
  • Update [SendDate] by 30 days.
  • Send e-mails to all recipients with deferral to newly calculated [SendDate].

Does that sound like it could work for you?

PS. All hair still in place. Cutting it short is a very effective safety device :-D
Dec 6 '11 #9
21 New Member
Hi NeoPa,

Thanks for the reply
I think the best approach to this matter is the one you suggested above
There are just some points that I don’t understand fully

I am guessing if I was to write the VBA code, it will be something like:

Expand|Select|Wrap|Line Numbers
  1. If Date  < Send Date
  2. Then Do Nothing 
  3. ElseIf
  4. Date= Send Date
  5. Then Call Command Msg    ‘which is the command that allows the message to be sent automatically
  6. Send Date = Send Date +30   ‘so the send date is updated for the next 30 days
  7. ElseIf
  8. Date > Send Date
  9. Then  
  10. .DeferredDeliveryTime =Send Date + 30
  11. End If
Where I am a bit confused is that last table row/last if statement which is in italics

This piece of code assumes that a situation will arise that the send date would be in the past compared to the present date but if the code works according to the way we want, this bit of code will never be needed because such a situation will never occur because the send date will always be in the future(initiall y) or will be set to a future date automatically if date=send date.

Also I am relatively new to access, so the question I am about to ask is going to be quite dumb..Sorry :(
How will I reference a field/row in a table in VBA code..like if I want to put reference to a specific cell in a table, how do I do that in VBA code
Also if the send date is a text box or cell in a table, am I able to update (i.e. send date = send date +30) automatically from visual basic

Thanks for all your help
Really appreciate it
Dec 7 '11 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Mailer-Daemon | last post by:
Dear Internet Email User, this is an automated mail delivery notification, because your email has not been delivered the usual way. Your mail was not deliverd for the following reason: Your mail contained an attachment with the filename extension
by: Mail Delivery System | last post by:
This message was created automatically by mail delivery software. A message you sent could not be delivered to the following recipients: ngr@cotswold.demon.co.uk RSET 250 ok MAIL FROM:<python-list@python.org> 250 sender is python.org!python-list RCPT TO:<ngr@cotswold.demon.co.uk>
by: Vexira | last post by:
* * * * * * * * * * * * * * * Vexira ALERT * * * * * * * * * * * * * * * This version of Vexira MailArmor is licensed and full featured. Vexira has detected the following in a mail from your address: Worm/NetSky.P.ExplWorm/NetSky.P, Worm/NetSky.P.Expl The mail was not delivered. Your computer may be infected with a virus! Please visit
by: Neil Ginsberg | last post by:
I have a strange situation using Access to automate a Word mail merge. Using Access 2000 and Word 2000, the code opens Word, opens the document in Word, sets a table in the calling Access application as the data source, and then performs a merge. Everything works fine. However, when a user uses it in Access 2002 and Word 2002, an extra instance of the Access application is opened and remains open at the end. Sometimes it remains open
by: murugesh82 | last post by:
Hi friends, I am doing project on java n j2ee. i am facing problem on sending automated mail to the customers when they registed? Plz how to do it.
by: Richard Gilmore | last post by:
within my database I have a login form with a forgot password button when the button is clicked you are prompted to enter your email in frmforgotpassword this value is used for the parameters of the qryforgotpassword I then want to perform a mail merge to my precreated document "password merge" So far using code I have managed to get the mail merge to work but it always opens up another instance of my database and asks me for the for a value...
by: Mail Delivery System | last post by:
--foo-mani-padme-hum-2391-1-1176705911 Content-Type: text/plain This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: giles@localhost SMTP error: 550 X-Spam_score: 9.0
by: steve | last post by:
I'm fairly new to Access and trying to figure out how to execute a particulary query. For example I have 2 tables named TEST and TEST1. TEST has a column labeled LETTERS with values A - Z. I want to execute the query SELECT ALL FROM TEST1 WHERE LETTERS = TEST.LETTERS. I want to reexecute the query for each record in the TEST1 table. Can I do this directly in a query or do I have to write a module. Any help would be appreciated. Steve
by: Troels Arvin | last post by:
Hello, Every so often, I'm asked to help people recover data from tables that were either dropped or where to much data was DELETEed. The complications related to restoring data are a problem. The SAS users are laughing because they can (to a certain extend) easily go back to an earlier SAS table by simply starting dsm. Of course, a flat file table is different than a relational table; but still, the trouble related to restoring DB2...
by: Baspad | last post by:
Hi... I want this topic is very urgent. can you help me.... How do access the delivery confirmation using CDONTS.NEWMAIL....
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.