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!

Auto Email 1

Status
Not open for further replies.

RabSwinney

Technical User
Aug 21, 2002
25
0
0
FI
Hi, I send out queries in excel format daily from access. The problem I am having some of the queries might return no data (Blank Sheets) How can I set up to auto send queries but only if there is data there (Non Blank)????????
 
What is your actual code sending the queries ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I run this with others when the database opens


Function Send()
On Error GoTo Macro1_Err

DoCmd.SendObject acQuery, "Qry_Detail Hierarchies", "MicrosoftExcelBiff8(*.xls)", "bbbbbbbbb@bbbbbbb.co.uk", "", "", "Detail Hierarchies", "", False, ""


Macro1_Exit:
Exit Function

Macro1_Err:
MsgBox Error$
Resume Macro1_Exit

End Function

 
A starting point:
If DCount("*", "[Qry_Detail Hierarchies]") > 0 Then
DoCmd.SendObject acQuery, "Qry_Detail Hierarchies", "MicrosoftExcelBiff8(*.xls)", "bbbbbbbbb@bbbbbbb.co.uk", "", "", "Detail Hierarchies", "", False, ""
End If

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top