Results 1 to 4 of 4
  1. #1
    zholmes2020 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    2

    + or - (x)

    I am trying to run a threshold query on Lat / Longs based on a decimal space. I have 2 tables with Lat / Long information i need to know if one set of Lat / Long info is + or - .0002 of the other database.


    Lat Long
    41.7387 -87.5539



    Any ideas?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Do these tables have any other fields that relate them - a city, zip code or some other unique ID?
    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.

  3. #3
    zholmes2020 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    2
    No, i have no values that can be related. I have a database with Lat / Long Pings. I have another database with Lat / Longs attached to Businesses and i want to see if those Pings are with (x) distance from the business so i can attribute a possible Business location to the Ping.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Ideas:

    1. query with the ping table that constructs fields with expression that subtracts .0002 from the lat/lon and then do another query that joins with the businesses table and see if there are matches

    2. use DLookup() expression in query to see if any matches are found in the businesses table
    DLookup("ID", "businesses", "lat=" & [lat] - 0.0002)

    DLookup will return ID of first record it hits that matches. If you want to how many records match:

    DCount("*", "businesses", "lat=" & [lat] - 0.0002)
    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.

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