Get the above error message when trying to run some automated emails out of access
It highlights this bit : "MySet As ADODB.Recordset "
Code
Function SiteMail()
Dim MySet As ADODB.Recordset
Set MySet = New ADODB.Recordset
MySet.Open "SiteEmail", CurrentProject.Connection, adOpenStatic
Do Until MySet.EOF
[Forms]![Main].[QSite].Value = MySet![Site]
[Forms]![Main].[QSiteEmail].Value = MySet![SiteEmail]
' DoCmd.SendObject acQuery, "SendToSite", "MicrosoftExcel(*.xls)", [Forms]![SendFile].[Qemail], "", "", "RCA Data", False, ""
DoCmd.SendObject acQuery, "SendSiteEmail", "MicrosoftExcel(*.xls)", [Forms]![SendFile].[QSiteEmail], "", "", "DM Investigation Service Failures [ACTION]", "There are service failures to be coded , Please click the link below to update these. http://intranet.csplc.org/mywork/BICustLog/Development/Lists/RCA/Demand%20Managers%20View.aspx?ShowInGrid=True&View=%7B31AB0392%2D4504%2D4A44%2DA45A%2D0F15EC44CDA5%7D" & vbNewLine & vbNewLine & "Please note that the attached spreadsheet is for information only.", False, ""
MySet.MoveNext
Loop
End Function
Any ideas? Ive used this functionality before in another database and i seem to recall having this issue once before, but i cant remember how i got round it
Cheers
It highlights this bit : "MySet As ADODB.Recordset "
Code
Function SiteMail()
Dim MySet As ADODB.Recordset
Set MySet = New ADODB.Recordset
MySet.Open "SiteEmail", CurrentProject.Connection, adOpenStatic
Do Until MySet.EOF
[Forms]![Main].[QSite].Value = MySet![Site]
[Forms]![Main].[QSiteEmail].Value = MySet![SiteEmail]
' DoCmd.SendObject acQuery, "SendToSite", "MicrosoftExcel(*.xls)", [Forms]![SendFile].[Qemail], "", "", "RCA Data", False, ""
DoCmd.SendObject acQuery, "SendSiteEmail", "MicrosoftExcel(*.xls)", [Forms]![SendFile].[QSiteEmail], "", "", "DM Investigation Service Failures [ACTION]", "There are service failures to be coded , Please click the link below to update these. http://intranet.csplc.org/mywork/BICustLog/Development/Lists/RCA/Demand%20Managers%20View.aspx?ShowInGrid=True&View=%7B31AB0392%2D4504%2D4A44%2DA45A%2D0F15EC44CDA5%7D" & vbNewLine & vbNewLine & "Please note that the attached spreadsheet is for information only.", False, ""
MySet.MoveNext
Loop
End Function
Any ideas? Ive used this functionality before in another database and i seem to recall having this issue once before, but i cant remember how i got round it
Cheers