When I use this line code in my access project
ACHI = "pippo@dompe.it"
d = " test"
cc = "pippo@dompe.it"
ogg = "Rendiconto reimmesso per revisione. "
sql = "use master EXEC master.dbo.xp_sendmail @recipients='" & ACHI & "',@message='" & d & "',@copy_recipients='" & cc & "',@subject='" & ogg & "',@no_output=true"
DoCmd.RunSQL sql
The code send the mail but I Loose the connection between my access project and the database in SQL server so if (in my Access project) I use the code....dcount("id","dati") or dlookup() or if I try to open a table in my access project I receive the error of Sql not connect and table not present
Help ME!!!!!!!!!!!
ASKER