Procedure to calculate distance using latitude/longitude

Does anyone know of a vba procedure for access that will calculate 
straightline distance using latitude and logitude for 2 points?
0
Utf
12/19/2007 11:43:02 PM
access 16762 articles. 2 followers. Follow

1 Replies
2230 Views

Similar Articles

[PageSpeed] 22

AJ wrote:
> Does anyone know of a vba procedure for access that will calculate 
> straightline distance using latitude and logitude for 2 points?

See:

http://groups.google.com/group/microsoft.public.access/msg/6b934b0e580b974b

James A. Fortune
MPAPoster@FortuneJames.com
0
James
12/20/2007 12:56:00 AM
Reply:

Similar Artilces:

XML -> Access -> XML plus useful validation
I have an XML file that needs to fill 4 MS Access tables and then later after processing I need to export back to the same structured but different XML file. I also have to validate the XML file before importing and after exporting, and log errors. I would like the validator to tell me which fields are not validating and why so I can log rich error information. I don't think MS VS. NET gives me this with XML Validator. What is the easiest way to do this? (I have a tight deadline - am open to purchasing a good component if .NET can't do this easily) I use Paradox tables for all my...

What categories do I use when I reimburse owner for using his own
My husband and I have a small business. He prefers to use his personal American Express card to charge everything for the business and for personal items. He wants the points. However, at the end of the month, he pays Amex with a check out of his personal checking account and I add up all the receipts for items he charged for the business and write him a check from the business to reimburse him. This is probably Accounting 1-0-1 but what are the proper categories & sub-categories to record this transaction? I use MS 2005 Small Business but own practically every year prior. ...

Using expressions in a report to calculate pay
I have created a report utilizing data from a query and a table that shows how many hours worked each day utilizing the expression: Expr1: Sum(DateDiff("n",[Schedule]![TimeIn],[Schedule]![TimeOut])/60) With that expression it gives me the answers that I need in the query. However, when I put it into a report it does not show any of the data from the schedule table that I utilized to create my timeclock. The other problem that I am encountering is that I am trying to calculate pay utilizing the expression: [Expr1]*[Hourly Wage]/60 When I create this expression ...

does outlook 2007 use XML for contacts and messages?
I had read somewhere recently that the replacement for outlook express uses XML for each contact record and for each individual message instead of using wab or whatever the default format is. I was curious to know if outlook 2007 has improved similarly. No. Outlook uses the contacts folder in either your pst or exchange mailbox. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://www.slipstick.com/outlook/ol2007/ Outlook Tips by email: dailytips-subscribe-request@list...

Cant use Import-Module in Powershell in SQL Server 2008 SQL Agent
Yo Geeks, SQL 2008 SP1 CU 5 Enterprise x64 Windows Server 2008 R2 Datacenter Wrote a basic Powershell script to get Membership of Certains Groups from AD using the ActiveDirectory Module new in 2008 r2/ Windows , and insert into a SQL table required for some old dodgy app. Tested outside of SQL Agent - all fine. Want to use as SQL Agent Job / Powershell step. Created a job and got message like "Import-Module is invalid command" Thought SQL might be running Powershell 1.0 , but $Host run from SQL Agent says 2.0 From same SQL Agent job do a "Get-Comm...

Linking .JPG files using VBA
I have a Table that includes the field "FileLocation" which contains the full file name of various JPG files. I wish to preview those files on an Access Form but I do not wish to manually insert the protographs one-by-one: rather I wish the photo to be displayed or, create an additional OLE Object field in the Table and, using VBA, populate that field with the required linkages. What version of Access is this? In Access 2007, you can bind an image control to a field. Dead simple. Even works even on continuous view forms. In older versions, use the Current event of the form t...

use custom installation wizard define %username% profile outlook 2
Dear All, I'm trying to use custom installation wizard to define default %username% profiles in outlook 2003 for all my exchange server 2003 users so that they can logon to any computer in the network and automatically use their %username% specific profile. My main difficulty is knowing at what stage in the default profile to write the parameter %username% . The wizard doesnt seem to understand this % symbol. Thanks. Gila Hi Gila, Have you seen the Office 2003 Resource Kit, there are several tools for Customizing Office, There are various options for for configuring Outlook...

Automatic/Manual calculation question
We use Excel 2000. One of the employees here has discovered that when she opens a spreadsheet set to manual calculation (Tools/Options/Calculation Tab)then opens one or more additional spreadsheets that are set to automatic calculation (without closing the original), all spreadsheets take on the manual calculation setting. The reverse is also true. Opening a spreadsheet set to automatic calculation and then opening one that was setup to manually calculate results in the second spreadsheet taking on the automatic calc. characteristic (temporarily). I've observed the same on a te...

How do i create a Function procedure that calls the Sub procedure
I have a working sub procedure, it is called: Sub SendMessage() I do not know to much about VB so details would be appreicated. I am trying to create a macro that kicks off this sub code (procedure) when the DB is opened from a Windows Scheduled Task. Thanks, Raymond Change the Sub into a Function. You can then use RunCode in your macro to fire it off. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Raymond" <Raymond@discussions.microsoft.com> ...

Update data from sql, using ODBC
Hi. (Excel 2007) I am preparing a model to be used by multiple users every week. A part of the model is a list of active project in the company. The project informations comes an sql database. In the model I have a table, which should be updated when the excelmodel is opened. The users do not have access to the sql database. Is there a way to set he table (properties, ... ) with the password stored in the model e.g. the users do not have to know and enter the password. Med venlig hilsen Peter ...

Stored procedure- XML
I've created a stored procedure to accept XML as parameter and loads the apporpiated field in the tables in SQL 2000. Evenrything works except.. the following I would like to update existing record if the ID exists in the table, otherwise insert the record(node) into the table.. I couldn't figure it out how to do this... using the XML IF exist UPDate .... Else Insert ..... ...

Heap corruption detected at 01670000 While Using CString
The Following is my function: CString CMem::GetALLData(UINT uStartStep, CString cRequests) { CString Package = "",sSteps, Buffer = ""; cs_Mem.Lock(); try{ int PLen = cRequests.GetLength(), Size = 0, Steps; if( Valid() && pMemStatus != NULL && pMediaBuff != NULL && PLen != 0){ for( int i = 0; i < PLen * 8; i++) { // if the request part is not in the list if( uStartStep + i > CurrentStep && uStartStep + i < CurrentStep + MemSize) { Steps = uStartStep + i - CurrentStep; //if( pMemRSTimes[Steps] &...

Thread using GetSystemTime() problem
Hi. This code compiles fine but generates an "unhandled win32 exception" error at runtime: UINT Thread1(LPVOID Param){ LPSYSTEMTIME time; GetSystemTime(time); return 0; } I call it in the OnInitDialog() method: CWinThread *th=AfxBeginThread(Thread1,this); If I just remove GetSystemTime(time) everything runs ok. Any ideas? azsx wrote: > Hi. This code compiles fine but generates an "unhandled win32 > exception" error at runtime: > UINT Thread1(LPVOID Param){ > LPSYSTEMTIME time; > GetSystemTime(time); > return 0; > } The API requires a pointer ...

Problem in calling sql stored procedure from dexterity
Hi friends, I have created stored procedures in ms sqlserver. These procedures are nested means one procedure call another procedure and so on. These procedures executes successfully in ms sqlserver. I have created prototype for calling main procedure in dexterity and from that other procedures are called. But when I call these procedures from dexterity. It does not execute successfully. It calls only first procedure. What is the reason for this? Is there any limitation of dexterity to call nested procedures? Should I need to break these procedures and define prototype for each and every ...

How to use VLookup with a range of numbers?
Hi I'm trying to solve this problem I have and could use some help, I was wondering if its possible to use VLookup to check through a range of data in one cell, ex: 89-100 or 71-74. But I'm not sure if there is a way to make excel understand FROM 89 TO 100 0r 71 TO 74. (Yes I've just started learning excel on my own) This is the problem I'm trying to solve: To calculate the data in the 20 Point Scale column, enter a formula that converts each student’s Final Percentage to a number grade on the 20 Point Scale as outlined below:- 80% and above = 1 75-79% ...

Using the Connection filtering
I read the article KB823866 "How to configure connection filtering to use REaltime Blacklist" and followed the directions for my 2003 exchange server. When I test the configuration using telnet, I do not get an access denied message. It says that it will accept mail from the made up recipient from the domain that is supposed to be denied from connecting to our server. Any suggestions? Reagrads, How are you testing Connection Filtering using telnet?, you would have to simulate the IP address of the SMTP server being blocked? -- Mark Fugatt Exchange MVP http://www.exchanget...

using SetBitmap
Hi, I wrote a program that is a dialog box and has a callback function. In the callback function i need to change a picture that is in the dialog box. Since the Callback function isnt in the same class as the dialog box i cant use -(CStatic*) GetDlgItem( IDC_IMAGE); and have to use - (CStatic*) GetDlgItem(g_hwnd, IDC_IMAGE); In the first case it works... In the second case (which is what i actually need) it throws an exception. the code looks like this - hBitmap = (HBITMAP)::LoadImage( NULL, "c:\\tactix.bmp", IMAGE_BITMAP, 0, 0, LR_DEFAULTSIZE | LR_LOADFROMFILE); pImage = (CStat...

New store procedure template
Sentences below are from the new store procedure template. Do I need all of them? SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET NOCOUNT ON -- Message posted via SQLMonster.com http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/201001/1 You don't "need" them, since you can get working code without them. (You might actually have these as your standard connection settings.) However, these are good settings to have on when you create a procedure and having them in the script means that it will correct any connection setting that might be different...

Forecasting using SUMPRODUCT and dates
I am having a problem with counting data that is within a certain date. for example, I have 4 columns. SERVERNAME, LOCATION, TYPE LEASEENDDATE. I am currently using SUMPRODUCT to count the number o servers I have for a particular location and type. A B C D SERVERNAME LOCATION TYPE LEASEENDDATE Server1 MN Web 6/30/2004 Server2 CA App 8/15/2004 SUMPRODUCT((B2:B200="MN")*(C2:C200="Web")) On another sheet, I would like to forecast of how many servers I hav that are not expired...

Outllook 2003 causes SVCHOST to use 100% cpu and never releases it
I have been using outlook 2003 for about 2 weeks. Now when I open it, it locks up the system svchost.exe is maxed out at 100% and never releases. I have scan for virus and removed and reinstalled office 2003. any suggestions as to what I can try next? John Hocking ...

Apply Sales Documents using Integration Manager or eConnect
Is there a way to integrate apply sales documents information using either integration manager or perhaps eConnect? Intg Mgr destination for Bank Transfers: Can't say about IM - but I know that eConnect has a procedure called taRMApply that let's you do so. Give that a look and see if it does the trick for you, Hope that helps, JG "Intg Mgr destination for Bank Transfers" wrote: > Is there a way to integrate apply sales documents information using either > integration manager or perhaps eConnect? ...

Another Math calculation
=(A1+B1+C1+D1)/4 That is an average. So far, so good. But what happens if I do not have one of the values and want the average of the ones that I have? Something like = { if A1 A1+ if B1 B1 + if C1 C1 + if D1 D1}/ ???? divided by what? JB AVERAGE(A1:D1) Regards, Bernd =AVERAGE(A1:A4) Empty cells will be ignored and Excel averages just the numbers that are present. Gord Dibben MS Excel MVP On Tue, 12 May 2009 20:21:40 +0100, "JB" <open@closed.com> wrote: >=(A1+B1+C1+D1)/4 > >That is an average. So far, so good. But what happens if I do not have one &...

calculating average days
I am trying to develop a report where in the PartNum footer the average number of days between orders is calculated. I have created the following: Table: tblItemsRecvd Fields: PartNum SupplrName DateOrdrd DateRecd AmtRecd Query: qryItemsRecvd based on tblItemsRcvd PartNum Criteria: [Enter PartNum:] SupplrName DateOrdrd DateRecd AmtRecd Report: rptItemsRecvd based on qryItemsRecvd I would like to calculate the average number of days between orders for the selected part number. Do I do it in the query (how?) or at the report level (how?)? I am using Acces...

How to script all stored procedures
In SQL 2005, how do you create a script for all the stored procedures to a file ? I only know how to do it 1 procedure at a time. Thank you. Right click on the database ---Tasks ---Generate Scripts--then choose Object Types =stored procedures "fniles" <fniles@pfmail.com> wrote in message news:%237Vrpcm4KHA.620@TK2MSFTNGP02.phx.gbl... > In SQL 2005, how do you create a script for all the stored procedures to a > file ? > I only know how to do it 1 procedure at a time. > Thank you. > Great, Thanks ! "Uri Dimant" <urid@...

Time calculations
I have a simple spreadsheet for determining the hours and minutes that an employee works during a pay period. The current result is formatted like "38:45" meaning 38 hours and 45 minutes. My payroll software needs the time worked in decimal format (i.e., 38.75). Can someone please show me how I would use an Excel formula to covert hours and minutes to hours and fraction of hours. Thank you. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ =A1*24 and format ...