Oh and if the code is changed to read
I get the 3061 error - to few parameters: expected 1Code:Private Sub cmdExcep_Click() Dim sLike$ Set rsMain = Nothing sLike = "*BLOCK*" With dlgOutput.List1 .AddItem "ACCOUNT BLOCKED" sSQL = "SELECT * FROM " & sFileN & " WHERE ![ERROR] LIKE '" & sLike & "'" Set rsMain = dbMain.OpenRecordset(sSQL) End With End Sub





Reply With Quote