Hi - I have converted .accdb to .accde, after the conversion macros not working. Before converting I have compiled the codes and haven't find any errors. I donot want the users to have copy .accdb Please suggest any work around for this. Thank you
Private Sub cmdSMail_Click()
Dim MySet As ADODB.Recordset
Set MySet = New ADODB.Recordset
MySet.Open "tblEmp", CurrentProject.Connection, adopenstatic
Do Until MySet.EOF
[Forms]![frmMain].[txtMyEID].Value = MySet![EID]
[Forms]![frmMain].[txtMyEmail].Value = MySet![Email]
DoCmd.SendObject acQuery, "CostCenterDetails", "Excel97-Excel2003Workbook(*.xls)", [Forms]![frmMain].[txtMyEmail], "", "", [Forms]![frmMain].[txtMySub], [Forms]![frmMain].[txtMyMsg], False, ""
MySet.MoveNext
Loop
MsgBox "Emails sent out successfully!"
End Sub
DoCmd.SendObject acQuery, "CostCenterDetails", "Excel97-Excel2003Workbook(*.xls)", [Forms]![frmMain].[txtMyEmail], "", "", [Forms]![frmMain].[txtMySub], [Forms]![frmMain].[txtMyMsg], False, ""
DoCmd.SendObject acSendQuery, "CostCenterDetails", acFormatXLS, Forms!frmMain.txtMyEmail, , , Forms!frmMain.txtMySub, Forms!frmMain.txtMyMsg, False