473,563 Members | 2,709 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application for "Find a Dealer Near You"

Joe
I need an Access application that can search dealers from my dealer
list, in a 30 miles distance from the user.

You may see many applications like this on the web if you search under
"find a dealer near you". Here is one I found:
http://www.shakespeare-antennas.com/...alersearch.asp

But I do not want to have it on the web, I want to create it on
access.
I think will need at least two tables:
One is a table of each of our dealers, including their zip codes.
The other one is the entire zip database whick include all zip codes
in the USA and Canada, including the lat and long for each.

Then, when the user enters the zip code of the person who wants to
find a dealer, the application will find its lat and long from the
second table. It will then "open" an area of 30 miles radius from this
lat and long, and will find all the dealers' ZIPs in that area.
Actulally,
the lat and long of each.

Then it will calculate the air distance from the user ZIP codes to
each of the Dealers ZIP codes.
Answers will be appreciated.

Aaron
ga*****@aol.com
Nov 13 '05 #1
8 2178
Joe,
Yeah, well . . . rolling your own is almost always more expensive, more time
consuming and consequently not a savvy career move. Microsoft publishes a
CD-ROM based version of its MapPoint web service that you can purchase at
your local computer retailer. It does exactly this and for a lot less than
the labor rate of most of us for something like this. But you would not
have posted a request like this if you had the good sense to buy something
that works. So, the technique goes like this. A geographic database is an
object database where each polygon of the map is an instance of an object.
All the objects inherit common characteristics like their center point, the
longitude & latitude at the center point, distance to an edge, etc. One of
the differences is that object databases are not 2 dimensional matrices of
rows and columns but 3 dimensional cubes of object instances. Things get
way more interesting and powerful from there. So, if this was to be an
Access database it would be a table of object instances with at least two
other tables--an intersection entity tieing properties to instances and a
table of properties. That's just the begining. There is a lot of code to
work out from there.
If . . . you are enough of a masochist to take this on then do the right
thing and plan it out in a flowchart software like Visio. But . . . if you
came to me with a check for my labor and asked me to write this I'd probably
take the check, go to my local software retailer, buy an off-the-shelf
product for you and give you the change. This can be done but it isn't a
trivial project.

"Joe" <ga*****@aol.co m> wrote in message
news:b4******** *************** ***@posting.goo gle.com...
I need an Access application that can search dealers from my dealer
list, in a 30 miles distance from the user.

You may see many applications like this on the web if you search under
"find a dealer near you". Here is one I found:
http://www.shakespeare-antennas.com/...alersearch.asp

But I do not want to have it on the web, I want to create it on
access.
I think will need at least two tables:
One is a table of each of our dealers, including their zip codes.
The other one is the entire zip database whick include all zip codes
in the USA and Canada, including the lat and long for each.

Then, when the user enters the zip code of the person who wants to
find a dealer, the application will find its lat and long from the
second table. It will then "open" an area of 30 miles radius from this
lat and long, and will find all the dealers' ZIPs in that area.
Actulally,
the lat and long of each.

Then it will calculate the air distance from the user ZIP codes to
each of the Dealers ZIP codes.
Answers will be appreciated.

Aaron
ga*****@aol.com

Nov 13 '05 #2
Actually, I bought MapPoint.
But I thought it is to kill a fly with a cannon.
I do not need the map, really. What I need is just an access application, you
will enter your zip , click ok, and the query will be executed to show you list
of dealers near you.

I am not sure why it should be 3 dim, as I am looking for air distance only.

Seems to me that it should be simple application, the way I described it on my
first posting.

Regards,

Aaron
Nov 13 '05 #3
Galsaba,
Right, but geo-databases are not relational, they are object based.
Different creatures, really. If you have MapPoint, then you can use the VB
hooks in it to instantiate MapPoint and have it find what you want. My main
point was that while it may seem like a simple thing to code it really isn't
and you are much better off trying to work with an off-the-shelf product.

"Galsaba" <ga*****@aol.co m> wrote in message
news:20******** *************** ****@mb-m15.aol.com...
Actually, I bought MapPoint.
But I thought it is to kill a fly with a cannon.
I do not need the map, really. What I need is just an access application, you will enter your zip , click ok, and the query will be executed to show you list of dealers near you.

I am not sure why it should be 3 dim, as I am looking for air distance only.
Seems to me that it should be simple application, the way I described it on my first posting.

Regards,

Aaron

Nov 13 '05 #4
ga*****@aol.com (Joe) wrote:
Then it will calculate the air distance from the user ZIP codes to
each of the Dealers ZIP codes.


How big are zip code zones? I suspect some are significantly larger than 30 miles.
And even if smaller can introduce some error into your algorithm.

I'd sure go with MapPoint.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 13 '05 #5
I tried MapPoint. Seems to me too complex and slow. It gives me more than I
need, but it is too general, and that's why slow. I do not need the map itself.
The only thing I need is a simple application that will calculate it.

Aaron
Nov 13 '05 #6
rkc

"Galsaba" <ga*****@aol.co m> wrote in message
news:20******** *************** ****@mb-m18.aol.com...
I tried MapPoint. Seems to me too complex and slow. It gives me more than I need, but it is too general, and that's why slow. I do not need the map itself. The only thing I need is a simple application that will calculate it.


Whatever you do you're going to have to spend around $60 US to get
a database with zipcode and latitude/longitude data.

Have you tried Google? There are plenty of hits on Visual Basic
code to calculate distances between two points. If my memory
serves correctly Lyle Fairfield has posted code to this newsgroup.
Other also most likely. Although what you probably want to do
is calculate maximum latitude and longitude points that are 30 miles
from a given point. I believe Alan Webb was trying to point out to
you that that may not be as trivial as it sounds.

Nov 13 '05 #7

"Galsaba" <ga*****@aol.co m> wrote in message
news:20******** *************** ****@mb-m18.aol.com...
I tried MapPoint. Seems to me too complex and slow. It gives me more than I need, but it is too general, and that's why slow. I do not need the map itself. The only thing I need is a simple application that will calculate it.


Based on what dataset? Are you going to develop your own schema & populate
it with your own zip code and distance information? Why ignore what has
already been done, is relatively cheap compared to paying a programmer
$150.00/hr for 80 hours (two weeks, and that's being naively optimistic), or
about $12,000.00 to build this? I'll tell you what, I bet a steak dinner at
Richbrau in Richmond, Va. (you have to get here to collect) that what you
want can't be done for less than what you paid for MapPoint. Even owning
MapPoint still means you still have some code to write to tie your app to an
instance of MapPoint.
Nov 13 '05 #8
Joe wrote:
I need an Access application that can search dealers from my dealer
list, in a 30 miles distance from the user.

You may see many applications like this on the web if you search under
"find a dealer near you". Here is one I found:
http://www.shakespeare-antennas.com/...alersearch.asp

But I do not want to have it on the web, I want to create it on
access.
I think will need at least two tables:
One is a table of each of our dealers, including their zip codes.
The other one is the entire zip database whick include all zip codes
in the USA and Canada, including the lat and long for each.

Then, when the user enters the zip code of the person who wants to
find a dealer, the application will find its lat and long from the
second table. It will then "open" an area of 30 miles radius from this
lat and long, and will find all the dealers' ZIPs in that area.
Actulally,
the lat and long of each.

Then it will calculate the air distance from the user ZIP codes to
each of the Dealers ZIP codes.
Answers will be appreciated.

Aaron
ga*****@aol.com


Aaron,
Assuming you get a copy of the US Postal Codes database suggested
elsewhere in this thread (and assuming you are looking for a US locaised
solution), the following VB6 function was posted by f_rodriguez
(http://www.experts-exchange.com/M_2148837.html) at
http://www.experts-exchange.com/Data...20383758.html:

*************** *************** *************** *************** *******
Public Const gEARTH_RADIUS_M ETRES = 6378007
Public Const gEARTH_CIRCUM_M ETRES = gEARTH_RADIUS_M ETRES * 2 * gPI
Public Const gMETRES_PER_LAT _DEGREES = 111113.519

Public Function GetDistance(dX1 As Double, dY1 As Double, dX2 As Double,
dY2 As Double) As Double
Dim dDeltaX As Double
Dim dDeltaY As Double
Dim dDeltaXMeters As Double
Dim dDeltaYMeters As Double
Dim dMetersPerDegre eLong As Double
Dim dCenterY As Double

dDeltaX = Abs(dX2 - dX1)
dDeltaY = Abs(dY2 - dY1)
dCenterY = (dY1 + dY2) / 2
dMetersPerDegre eLong = MetresPerDegree Long(dCenterY)
dDeltaXMeters = dDeltaX * dMetersPerDegre eLong
dDeltaYMeters = dDeltaY * gMETRES_PER_LAT _DEGREES
GetDistance = Sqr(dDeltaXMete rs ^ 2 + dDeltaYMeters ^ 2)
End Function

Public Function MetresPerDegree Long(ByVal dLat As Double)
MetresPerDegree Long = (Cos(dLat * (gPI / 180)) *
gEARTH_CIRCUM_M ETRES) / 360
End Function
*************** *************** *************** *************** *******

HTH
Doug

Nov 13 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
13242
by: 321ConTact | last post by:
I have to find zipcodes within a given mileage range (25, 50, etc). I know it's possible to use the longitude/latitude to find this, and I have that for the zipcodes, but does anyone have a "ready made" formula? I know it has something to do with the sine/cosine, but the "signs" aren't clear enough to me (neither are the wonders). Thanks in...
5
45062
by: J. Muenchbourg | last post by:
IN the code below, I am getting an Incorrect Syntax near "," error (the sql execute line, and it is pointing to position 1 ) (the display formatting here may look different than my script): strSQLStatement = "INSERT INTO tblArticles(handid,articleid,articleDate,sport,articleheader,fpick,artic leText)"_ & "VALUES ('" & handid & "', " _ &...
1
2645
by: Galsaba | last post by:
Anyone knows how I can find a script for "Find a Dealer near you" locator script? I prefer to have it in two stages: 1. The customer will enter his address, and then the result will be a list of dealer in a radius of let's say 20 miles. 2. When the user clicks on the dealer's link, the result will be the exact Driving distance. If this...
1
1419
by: Galsaba | last post by:
I am trying to write one. Are there any tools that I need to use to write it?(may be mapPoint?) I think that there are two ways to write the appication: 1. Having database of all my dealers, each with latitude and longtitude. When the customer eneters his zip code, then I need to calculate how many dealers are in that area. I am trying to...
1
2056
by: Galsaba | last post by:
I am trying to find a script to a "dealer locator" or "find a store near you". I will have two tables. One will include all US and Canada ZIPs including lat and longtitudes. The other one is a table of our dealers (or store) including thier ZIP codes. When the user enters his ZIP code, the application needs to check (based on the lat and...
1
5462
by: Marc | last post by:
I'm trying to execute a query in a postgresql database when the following message displays: State: S1000 Code: 7 Message: ERROR: parser: parse error at or near "." Regs. Marc Oost
2
7640
by: Lenonardo | last post by:
Hi. I'm writing a VB.Net application to update multiple Excel Worksheets. I'm using late binding (i.e. all variables are objects + use createobject) I develop the application on an XP machine with Excel 2002 (version 10.0) installed - and the code works fine. I then test the code on a laptop running Excel 2000 (version 9.0) and it
1
3344
by: itamar82 | last post by:
I am getting the following error: Microsoft OLE DB Provider for SQL Server error '80040e14' Incorrect syntax near the keyword 'WHERE'. for the sql below: SELECT TourId FROM (SELECT ROW_NUMBER() OVER (ORDER BY BaseTours.DateCreated DESC) AS RowNumber
0
1195
kmartinenko
by: kmartinenko | last post by:
Hello, I am wondering if there is a sly workaround in ArcGIS 9.2 where I can write a "near" analysis script in Python and create my own tool for the purpose of identifying the distance values between multiple points and lines? Apparently the Near tool under Proximity Analysis in ArcMap is restricted to ArcInfo users. If anyone out there...
0
7664
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.