Odd/Even Street Address Report

  • Thread starter Thread starter Rhonda Floyd
  • Start date Start date
R

Rhonda Floyd

I need to create two Address reports separating Odd and Even Street Numbers.

I need one report that will show all the Odd number addresses (e.g. 2129 E. Inverness). And another report with the Even number addresses (e.g. 2128 E. Inverness).

How can I do this?

Any help will be greatly appreciated.

Thank you.
 
First you need to separate out the street number from the address and get it
in numeric form (almost certainly, it is just part of a text field now).
Because of the variations in addresses, that may not be quite so simple as
it seems. For the example you show, you could extract the text up to the
first blank space, and use the builtin CLng function to convert it to a Long
Integer. That may not work nearly so well for addresses where the number is
itself spelled out "Two Thirty Three Massive Plaza" or the number isn't
actually numeric "235D Industrial Way".

If you get it into numeric form, check Help on the Mod function to determine
Odd or Even.

If (lngV Mod 2) <> 0 Then
... variable lngV was odd
Else
... variable lngV was even
End If

If you had the numbers stored separately in the database, you could just use
Mod in the criteria, but that's not likely the case.

Larry Linson
Microsoft Access MVP


I need to create two Address reports separating Odd and Even Street Numbers.

I need one report that will show all the Odd number addresses (e.g. 2129 E.
Inverness). And another report with the Even number addresses (e.g. 2128 E.
Inverness).

How can I do this?

Any help will be greatly appreciated.

Thank you.



----------------------------------------------------------------------------
----


I need to create two Address reports separating Odd and Even Street Numbers.

I need one report that will show all the Odd number addresses (e.g. 2129 E.
Inverness). And another report with the Even number addresses (e.g. 2128 E.
Inverness).

How can I do this?

Any help will be greatly appreciated.

Thank you.
 
Rhonda,
I can only hope you have a way of extracting just the street numbers from all your addresses, since most addresses in an address database don't follow "concrete" logical rules... so I'll leave that to you.
Once you have the "numeric" portion of the address parsed out, then determining if a number is odd or even could be done with the mod, try the Mod operator...
If [StreetNumber] Mod 2 = 0 ' then it's even
In your query behind each of your reports, you can filter accordingly.
--
HTH...
Al Campagna
Candia Computer Consulting
Candia, NH

I need to create two Address reports separating Odd and Even Street Numbers.

I need one report that will show all the Odd number addresses (e.g. 2129 E. Inverness). And another report with the Even number addresses (e.g. 2128 E. Inverness).

How can I do this?

Any help will be greatly appreciated.

Thank you.
 
Back
Top