SendObject Automatically

  • Thread starter Thread starter AHarrison
  • Start date Start date
A

AHarrison

Guest
I'm very new to visual basic and I'm trying to get Access to send an e-mail automatically when the current date [Date()] reaches the date entered in the field (which is always in the future). I have the SendObject code, but can anyone help me with the If...Then part of the code that gets the date to trigger the sendobject??
Thanks!!
 
If Me.[NameOfContolInYourForm]<=Date() then
' SendObject
End If
 
This will only work of course if an event causes this code to be run.

if you're thinking about leaving the application open all the time and want to check periodically if there's anything to send, put the above code in an OnTimer Sub.

If you want it to check once only each time a particular form is opened, put the code in an OnLoad Sub.

Mike
 

Users who are viewing this thread

Back
Top Bottom