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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add SQL to SendObject? 1

Status
Not open for further replies.

PJFry

Technical User
Feb 6, 2005
93
US
Before I beat my head against the wall trying to do this, is there a way to use sql in the SendObject command?

For example...
Code:
DoCmd.SendObject acSendQuery, "qWVR", acFormatXLS, "hooty.mcboob@taxi.com", , , "First Pay Defaults","Please find attached the report for [u]SELECT MAX(tWVR.dtmBusinessDt) FROM tWVR GROUP BY tWVR.dtmBusinessDt [/u]"

Thanks in advance!
PJ
 
Like this ?
DoCmd.SendObject acSendQuery, "qWVR", acFormatXLS, "hooty.mcboob@taxi.com", , , "First Pay Defaults", "Please find attached the report for " & DMax("dtmBusinessDt", "tWVR")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Perfect! I have always seen the 'D' commands, but have never really looked into them. Thanks for the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top