Hi everyone,

I was wondering if you might be able to shed some light on what is probably a simple problem:

I have read carefully the post titled:

Access and Fields of Recordsets using DAO3.6 [Resolved]

I am experiencing a similar problem, though I have checked and checked again for typos to no avail. I have also tried to enter a Stop statement as suggested in the above thread but before the Stop happens the error occurs, so I can't step in and take a look.

My only incling is that perhaps the code is looking for Distributors.Email in the wrong place (it is a field called "Email" in a table called "Distributors" - though I did hope this was explicit).

If anyone can spot my mistake I would be delighted to hear what it is, otherwise if the Stop statement could be explained further to help me uncover the problem that would be much appreciated!

Many thanks in advance!

Abiart


Code:
Private Sub EmailDistributorsEnquiryDetails_Click()
Dim rsEmail As DAO.Recordset
Dim strEmail As String
Set rsEmail = CurrentDb.OpenRecordset("qryDistributorsEnquiryDetails")

Do While Not rsEmail.EOF
strEmail = rsEmail.Fields("Distributors.Email").Value
Stop
DoCmd.SendObject acSendQuery, acqryDistributorsEnquiryDetails, acFormatXLS, Distributors.Email, [[email protected]], , "Company Name Sales Leads", "Dear [DistributorEmails.FirstName] Attached is your monthly update of sales leads. We would appreciate if you could go through these records and let us know the status of the enquiries. Thank you for your kind assistance in this matter. Kind regards Company Name Sales Team", 1

rsEmail.MoveNext

Loop
Set rsEmail = Nothing

End Sub