Hey guys,
Stuck again, and have lots of success on here so I'm back!
Trying to streamline a job duty we have and hoping you can help.
Have a command button that when clicked sends emails to everyone we need to, works totally fine. This button does LOADS of other stuff with our records and it all works, but now I have a new requirement where we can not send emails out within 24 hours of each other.
So now when we click this button to send our emails, a record is added to a table with a Now() time stamp to show when we last sent emails. As I don't trust everyone to view the field I've put on my form to show the most recent time emails were sent I'm trying to make a message box pop up if our send emails button is being hit within 24 hours of the most recent time field.
So if I sent emails yesterday at 2PM (7/30/2014 2:00:00 PM) and I click the button today at 1:55PM (7/31/2014 1:55:00 PM) I want a message box to appear telling the user to try again later.
I had this working fine as we were under the rules of not sending emails twice in one day, so my field use to populate with Date(), and my code would reference "If Me.Emails_Last_Sent = Date() Then..." and my message box was fine. But now that calculating time within 24 hours is involved I'm heavily confused....
Hopefully not a repeat question, searched around the forums, didn't see anything that gave me an epiphany I usually get!
Thanks!