iwanalearn
Technical User
In Microsoft Access 2000, I want to query a number field and have the query only pull out the odd numbers. I've found in a different thread showing how it is done for even numbers and it works great. See Below. I'm new to Access and can't figure out how to apply this to odd numbers.
Thanks
JerryDennison (IS/IT--Manageme) Apr 3, 2001
Yes, add a field to the QBE grid using the following syntax(substitute your actual field names where I have place holders):
Even: [FieldName] Mod 2
Then, in this field's criteria put False. The remainder of any even number when divided by 2 is 0. Since 0 is always False(another way to look at it, is any number that is NOT 0 is True) then setting the criteria to False will give you only those records that are even.
Thanks
JerryDennison (IS/IT--Manageme) Apr 3, 2001
Yes, add a field to the QBE grid using the following syntax(substitute your actual field names where I have place holders):
Even: [FieldName] Mod 2
Then, in this field's criteria put False. The remainder of any even number when divided by 2 is 0. Since 0 is always False(another way to look at it, is any number that is NOT 0 is True) then setting the criteria to False will give you only those records that are even.