Dear Starr N
Welcome, and thank you for sharing your issue in the Q&A forum.
Based on the information you provided, I understand that you're trying to isolate rows where the "Total" column does not match the sum of two other numeric columns, using the NOT LIKE statement. However, you're getting the opposite result from what you expected.
The core issue here is the misuse of the NOT LIKE operator. This operator is designed for pattern matching in text fields, not for performing numeric comparisons. When applied to numbers, it can produce inaccurate or unexpected results.
To compare numeric values properly, you should use the "not equal to" operator (<>) instead of NOT LIKE. Here's the correct syntax:
[Total Column] <> ([Column1] + [Column2])
Show more lines
By replacing NOT LIKE with <> in your query criteria, Access will correctly display only the rows where the sum is incorrect.
To ensure this solution works perfectly for your data environment, I’d appreciate it if you could provide a bit more detail:
- Data Types: Could you confirm whether the columns you're working with (Column1, Column2, and Total) are formatted as Number or Text in Access?
- Sample Data: If possible, please share a few sample rows (5–10) from these columns. This will help me test the logic and ensure the query syntax works correctly with your actual data, including any edge cases.
Your input will be very helpful in finding the best solution for your situation. Thanks again, and I look forward to your reply!