All, using access 2010. I have some code to loop thru a table in a module. The following is a snippet:
This code loops thru a table in my database, but the table has records and it causes duplication. I would like to instead use the query which I thought I was using but it still pulls from the table. How do I get the loop thru the query "EA01_qryCust_email" instead?Code:Set rstCusts = CurrentDb().OpenRecordset("EA01_qryCust_email") With rstCusts ' Get the total e-mail count. .MoveLast intNumEmailsToCreate = Nz(.RecordCount, 0) .MoveFirst
Thanks