I am running into a wall. I have a program that will be uploading email addresses (from our company) from one access database to a SQL database adding new ones as necessary. I am using ADO.

SO I open the recordset,

CustConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Customer.mdb"
CustConn.Properties("Jet OLEDB:Transaction Commit Mode") = 1

Then I generate one recordset to get the number of records for Unique Email addresses.

SQL = "Select Count(Distinct([email_address])) as EmailCount from Customer_Info where trim([Email_Address]) <> '' and [Exclude_Email] <>'Y'"
CustRS.Open SQL, CustConn, adOpenForwardOnly, adLockReadOnly, adCmdText

This returns 29979 records.

Then I gather those records.
Set CustRS = Nothing
SQL = "Select Distinct ([email_address]) from Customer_Info where trim([Email_Address]) <> '' and [Exclude_Email] <>'Y'"
CustRS.Open SQL, CustConn

Then I loop through them one by one.

Do While Not CustRS.EOF
lblLeft.Caption = CStr(Val(lblLeft.Caption) + 1)

When I do, I always come up 1827 short in the count with a starting value of 29979. Any ideas why? The databases I am using while developing are static so there are no changes being made. They also have no one else using them so I don't think it is a locking problem. Just can't seem to figure this one out. I normally use DAO but was trying something new.

Robb Feldhege