select UPC from csrPOLines ; with (buffering = .t.) ; where UPC = thisform.oPO.UPC ; and not (department = thisform.oPO.department and category = thisform.oPO.category and item = thisform.oPO.item) ; into cursor csrUPCCheck NOFILTER if _tally > 0 lnChoice = messagebox('WARNING!' + chr(13)+ "There are multiple rows with UPC = " + alltrim(UPC) + ; ". Proceed with save?", 4, "PO Edit Warning") endifAnd I was getting a warning after I added first item with no UPC and second item with some UPC. I ran that code a few times with the same result and in the debugger and found that row with empty UPC was selected. I somehow didn't realize that it doesn't matter where the column is (in the left or right) but it the length of it matters when the SET ANSI IS OFF.