G
Guest
Hello,
I am trying to access set of records in a query sequentially to send
email. I have the following code to access a query.
*****
Sub ReadRecords()
Dim dbsTemp As DATABASE
Dim rst As Recordset
Dim intRowCount As Integer
Set dbsTemp = CurrentDb()
Set rst = dbsTemp.OpenRecordset("QrySearchForEmail")
If rst.RecordCount = 0 Then
MsgBox "There are no records in the error table", vbInformation
GoTo ExtractErrors_exit
End If
ExtractErrors_exit:
rst.Close
Set rst = Nothing
Set dbsTemp = Nothing
Exit Sub
**************
However, I get error "User-defined type not found" error for 'DATABASE'
I also tried using DAO.DATABASE, but get the same error?
1. How can I resolve this error?
2. Is there a beter way to send mass email for a list of emailid from a table?
Thank you in advance,
-Me
End Sub
I am trying to access set of records in a query sequentially to send
email. I have the following code to access a query.
*****
Sub ReadRecords()
Dim dbsTemp As DATABASE
Dim rst As Recordset
Dim intRowCount As Integer
Set dbsTemp = CurrentDb()
Set rst = dbsTemp.OpenRecordset("QrySearchForEmail")
If rst.RecordCount = 0 Then
MsgBox "There are no records in the error table", vbInformation
GoTo ExtractErrors_exit
End If
ExtractErrors_exit:
rst.Close
Set rst = Nothing
Set dbsTemp = Nothing
Exit Sub
**************
However, I get error "User-defined type not found" error for 'DATABASE'
I also tried using DAO.DATABASE, but get the same error?
1. How can I resolve this error?
2. Is there a beter way to send mass email for a list of emailid from a table?
Thank you in advance,
-Me
End Sub