Route Query to show only 'even' street numbers (or only odd) - How ??

  • Thread starter Thread starter Will
  • Start date Start date
W

Will

Trying to create a route sheet.

How can I tell the query to only show the even street numbers... or only the
odd numbers?

So the courier can go up one side of the street and down the other?

The street numbers are in a field by themselves.

thanks for any help.
 
If the street number is a separate numeric field, you can create a
calculated field that uses the Mod function to return 0 for even numbers and
1 for odd numbers, and use that field as a criteria (or sort on it)

If the street number is part of a larger text field, try using the Val
function on it. Val("1234 Main Street") will return 123, and you can then
use the Mod function on that. You will run into problems with, say,
Val("1234 5th Avenue"): that will return 12345, and hence will end up being
wrongly distinguished as odd. If you're conerned that you will have that
situation, let us know how you're actually storing the addresses.
 
Trying to create a route sheet.

How can I tell the query to only show the even street numbers... or only the
odd numbers?

So the courier can go up one side of the street and down the other?

The street numbers are in a field by themselves.

thanks for any help.


Add a new column to the query grid.

EvenOdd:[StreetNum] Mod 2

For Even numbers, as criteria on this column, write
= 0

or if you want odd numbers:
= 1
 
Back
Top