Can someone take a look at my code below and tell me if there is a syntax error in my rs1.Open statement? The Dcount statement is giving me the correct result (2 records), but my rs1.EOF is TRUE immediately following the open statement.
StrWhere = "([CustNumber] Like '*ROB102*')"
StrMsg = MsgBox("You are about to add " & DCount("*", "tblSalesSpecialPricing", StrWhere) & " record(s).", vbOKCancel + vbDefaultButton2)
If StrMsg = vbCancel Then Exit Sub
Dim Con1 As New ADODB.Connection, Con2 As New ADODB.Connection
Set Con1 = CurrentProject.Connection
Set Con2 = CurrentProject.Connection
Dim rs1 As New ADODB.Recordset, rs2 As New ADODB.Recordset
rs1.Open "SELECT * FROM tblSalesSpecialPricing WHERE " & StrWhere, Con1, adOpenDynamic, adLockPessimistic
While Not rs1.EOF