Searching using an address String

A

Al

I have a database that seperates the elements of an address into seperate
fields.
Street Prefix, Low Street Number, High Street Number, Street Directional,
Street Name, Street Type.
I would like to have users enter an address as single string, then use that
string to search the database.

I need help with this.
Thanks
 
J

John Spencer

If they enter one string then you would need to parse that into its
separate parts - a difficult if not impossible task to accomplish
accurately to set up accurate criteria.


You could try something like the following but that would require you to
match all the Fields and you would surely get false matches and miss
matches.

Field: Forms![Name of your Form]![Name of your control]
Criteria: Like "*" & [Street Prefix] & "*"

Field: Forms![Name of your Form]![Name of your control]
Criteria: Like "*" & [Street Name & "*"

Field: Forms![Name of your Form]![Name of your control]
Criteria: Like "*" & [Street Type] & "*"

etc.

The problem is that Low Street Number and High Street number would
probably not be able to be matched, etc.

If the user enters one of the following four strings, how do you intend
to match this address to your data
124 E Surrey Lane,
124 East Surrey Ln,
124 E Surrey Ln,
124 East Surrey Lane
East Surrey Lane

Your first step would be to parse the entry string into its parts and
then change the parts to match how you are storing data. For instance
change Lane to LN as the street type (or the other way round).

Good luck


'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top