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

New SendObject Question

Status
Not open for further replies.

tma12000

IS-IT--Management
Nov 24, 2003
19
US
I am trying to send the output of a query to a set email address in excel format. Will the macro still run if there is no output from the query? I would prefer that it didn't, but no where in the macro does it allow for such an option... any thoughts?

Thanks,
Tim
 
Tim,

One of the main limitations of macros is the inability to handle for errors and other non-routine happenings in a process. Have you considered moving your steps from a macro into a simple code module? Then you could check for an empty query and only send the file if you had data. You would also have more flexibility for future enhancements to your process.

Good luck,
pat
 
Pat, thanks for the suggestion. I would consider, but I have no vb experience at all and would have no idea how to get it done.

Thanks,
Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top