Results 1 to 1 of 1
  1. #1
    Join Date
    Dec 2005
    Location
    Somewhere on the 3rd Rock
    Posts
    93

    Question Unanswered: Calculate distance between 2 zip codes

    I am working on a new program and need to calculate the distance between 2 zip codes.

    This is the basic setup.

    Form1 has 2 boxes on it, each of them for entering the zip codes.

    CustomerZip is the beginning zip code
    ConsigneeZip is the ending zip code.

    The zip code data is stored in zipcode_table

    zipcode_table fields are
    ZipCode (5 digit zipcode) (Primary Key)
    ZipLong (commerically ava Longitude from Zipcode DB)
    ZipLat (commerically ava Latitude from Zipcode DB)
    ZipState

    Once the data is entered on the form1, it will update a third field stored in the Master_table of the total (as the crow flies) miles.

    I have looked at several API models, and dozens of code examples, but I am truley lost.

    The user process.

    The user will enter the pickup location address, city, state, and zipcode, by select the customer from a drop down box that contains all customers in the Customers_table

    Once selected this will update the following feilds on form1

    CustomerName
    CustomerAddress
    CustomerCity
    CustomerState
    CustomerZip
    CustomerPhone
    CustomerContact

    The user will then do a similar process for the drop customer from the Consignee_table

    Master form fields
    ConsigneeName
    ConsigneeAddress
    ConsigneeCity
    ConsigneeState
    ConsigneeZip
    ConsigneePhone
    ConsigneeContact

    The Zip codes in each box should be compared to the Zipcode_table to determine the distance, and then place that distance in the TripMiles Field inside the Master_table

    Once the data is entered for that record it will not change, that is the only reason I looking to store the calculated distance in the Table.

    Can anyone help me with this, as I have no Idea where to start with Access 2007 edition, it is a lot different from 2000.

    Thanks
    Last edited by saileast; 04-06-11 at 15:37.
    Will Dove
    working hard is better then hardly working ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •