Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically Sending an email with the results of a query

Status
Not open for further replies.

arobbo

IS-IT--Management
Feb 15, 2005
62
0
0
GB
Hi the senario is this,

On the last day of the month i would like a query to be run and the results sent in an email to various people in our company...

I have no idea how to get the query into an email and get it sent on the last day of every month, could someone help

Many thanks

Andy
 
You may consider the DoCmd.SendObject method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
any ideas what sort of VB code you'd write to activate the query on the last day of the month ??
 
Thanks for your help guys almost there i think, i'm afraid my VB isn't very good at all. The Docmd.SendObject seems perfect.

i was thinking something like If date() = 31/12/2005 OR etc etc
Then
Docmd.SendObject .........

but where abouts would i put this code so that it would always run?
 
Hi

How about

If Day(DataAdd("d",1,Date())) = 1 Then
doCmd.SendObject ...etc
End If

You could put this in the on open event of a splash screen which is set to run at start up (see Tools\startup)



Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top