Validate Mod 7 numbers

AndyQuintana

New member
Local time
Today, 11:25
Joined
Jul 30, 2013
Messages
3
AWB numbers consist of 8 digits. The rightmost digit is a Mod 7 check digit. For example: 1234567 returns a check digit 5, so the AWB number is 12345675. How do I design a query to validate the accuracy of an AWB number?
 
New field in query:
Verify: IIf(Left([numbers];7) Mod 7=Right([numbers];1);True;False)

Replace [numbers] with [YourFieldWithNumbersToCheck]
 
In fact this should work as well and is more elegant :)
Verify: Left([numbers];7) Mod 7=Right([numbers];1)
 
Thank you very much Mihail. This works perfect. I entered the following:
Verify: Left([Table1]![AWBNumber],7) Mod 7=Right([Table1]![AWBNumber],1)
commas instead of semicolons before 7 and 1. The Verify results I get are -1 and 0 for true and false respectively.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom