DoCmd.SendObject Dcount

tozey

Registered User.
Local time
Today, 14:29
Joined
Apr 27, 2010
Messages
23
Hello all

is it possible to add the results of a dcount in a message body, I have tried many combinations of code and searched the net but cannot see if it is possible or not.

like this in the message body text:

DoCmd.SendObject acSendQuery, "my_query", acFormatXLS, "Joe Bloggs", , , "DCount("AccountNumber","table","[criteria] = 'please work'") & " " & "this is the total this week. Thanks",False

Thanks for looking

Alex
 
Just remove the extra and strangely placed quotes??!!
DoCmd.SendObject acSendQuery, "my_query", acFormatXLS, "Joe Bloggs", , , DCount("AccountNumber","table","[criteria] = ""please work""") & " " & "this is the total this week. Thanks",False
 
Thank you, attention to detail wins again!!!

Thank you...
 

Users who are viewing this thread

Back
Top Bottom