R
RT
i need to automatically send/email an access report on
every friday.
I tried using sendobject function in a vbs file
*****************************************************
Set objAccess = CreateObject("Access.Application")
objAccess.Visible = True
objAccess.OpenCurrentDatabase "c:\ritu\customer.mdb"
objAccess.doCmd.OpenForm "customer details", acFormDS, , ,
acFormReadOnly, acWindowNormal
'sending the report by email
objAccess.doCmd.SendObject acSendReport, "rpt_customer",
acFormatXLS, "<email add>", , , , , False
********************************************************
when i run the file,it opens access,opens the form,
- asks for file format!!..even though i have mentioned xls
format..
- and after selecting the format..it gives the foll error:
microsoft jet database engine could not find the
object 'rpt_customer'. make sure the object exists and
that you spell the name and the path name correctly "
the same code on click of a button in a form works fine.
is there anything wrong that i am doing? is there any
other method i should be using?
every friday.
I tried using sendobject function in a vbs file
*****************************************************
Set objAccess = CreateObject("Access.Application")
objAccess.Visible = True
objAccess.OpenCurrentDatabase "c:\ritu\customer.mdb"
objAccess.doCmd.OpenForm "customer details", acFormDS, , ,
acFormReadOnly, acWindowNormal
'sending the report by email
objAccess.doCmd.SendObject acSendReport, "rpt_customer",
acFormatXLS, "<email add>", , , , , False
********************************************************
when i run the file,it opens access,opens the form,
- asks for file format!!..even though i have mentioned xls
format..
- and after selecting the format..it gives the foll error:
microsoft jet database engine could not find the
object 'rpt_customer'. make sure the object exists and
that you spell the name and the path name correctly "
the same code on click of a button in a form works fine.
is there anything wrong that i am doing? is there any
other method i should be using?