Access VBA recordset string comparison not working with wildcard
问题 I have loads of experience using VBA in Excel but very little experience using VBA in Access 2010. I'm trying to delete records from a recordset where one of the fields ends in "_X". When I use a wildcard the comparison fails. When I use a specific string, the comparison works as expected. Here is the Code that I am using. Dim db As Database: Set db = CurrentDb Dim tbl As Recordset: Set tbl = db.OpenRecordset("WRITEON") With tbl Do Until .EOF If ![ACOD] = "*_X" Then '"$ICP_X" works Debug