Results 1 to 5 of 5
  1. #1
    Jantje Beton is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    2

    Convert a vertical distance table to a matrix

    Hello everyone,



    I am pretty new to access and only used it once before, therefore I am trying to find an answer on this forum.

    I received a distance table of 402 regions, with each its on regional code, to each other in driving time in minutes.
    Thus in total 402x402=161,604 records.
    However, all records are listed below each other (as in the attached picture), but I need it in a matrix form.

    How do I do this? Thanks in advance.
    Click image for larger version. 

Name:	Example.png 
Views:	9 
Size:	33.8 KB 
ID:	22995

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Why do you need a matrix?
    What exactly is the application involved?
    Do you have an Excel background?
    The column names in your sample look the same. What does each mean?

    Regions tend to be areas, whereas locations tend to be points. You can get driving distances between points/locations via Google Maps.

  3. #3
    Jantje Beton is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    2
    For my research I am performing regressions in StataSE13 which have to be geographically weighted, for which I need this distance table.
    I received it as a MS Access file, thus I do not have an excel background.
    I already got the driving distance, that is the last column.
    The explanation next to the table was that those are the distance between 'regions' and they took the central place of each region.
    The table goes down to record 161604, thus after each 402 time the same region, another region follows. The names are region names and the i.e. 1001000 are the regional codes.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    OK, so you were given the table and the table has distances between every area/centroid(approximate center of an area).

    What exactly are you going to do with the data in simple terms?

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    You want a mileage table/chart, like what you find in a road atlas?

    Might be as simple as a CROSSTAB query.

    However, queries are limited to 255 fields. Since there are 402 regions, I don't think Access can provide the output you want in a single chart. And printing 402 columns on single sheet of paper wouldn't be easy anyway, even if the header labels are rotated vertical.

    If you want to provide db for analysis and testing, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Convert a Matrix Table to a Vertical Table
    By countingguru in forum Programming
    Replies: 5
    Last Post: 11-19-2012, 05:21 PM
  2. Replies: 6
    Last Post: 10-10-2012, 05:08 AM
  3. Google Distance Matrix API
    By rbiggs in forum Programming
    Replies: 2
    Last Post: 07-11-2011, 06:51 AM
  4. Replies: 1
    Last Post: 01-28-2011, 02:45 PM
  5. Top 3 times for each distance
    By CraigBFG in forum Queries
    Replies: 0
    Last Post: 06-24-2009, 09:19 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums