View Full Version : Condition within a Macro Help Needed


ahleah
11-07-2006, 02:03 PM
I have a macro that the Actions are to SendObjects (Qrys) as attachments via Outlook.

I would like a condition placed that if one of these qrys do not have any records (null), that the SendObject cmd for that particular qry is skipped and then the macro goes to the next SendObject line.

I've spent hours looking through the threads but still can't find what I'm looking for. ANY guidance is greatly appreciated!!!:confused:

pbaldy
11-07-2006, 02:15 PM
I don't use macros, but you should be able to put a DCount in the condition area, basically testing for >0.

ahleah
11-07-2006, 02:47 PM
Thank you Paul for your reply....I did as you mentioned, but then I rec'd a mismatch type error!! It's been a LONG DAY!

pbaldy
11-07-2006, 02:50 PM
Tried this as a macro condition and it worked fine:

DCount("*","QueryName")>0

ahleah
11-08-2006, 07:03 AM
YOU are a godsend! Thank you, I didn't use the *. THANK YOU so much!! :)