Auto-Update Currency Exchange rates in Access 2010

Posted on 2011-04-28
Last Modified: 2016-04-27
I need my database to have updated information about currency exchange rates.
Is there a function or API that gets that information from an internet server?
Question by:Hikarus
    LVL 48

    Expert Comment

    by:Gustav Brock
    From this site daily files can be obtained:


    Author Comment

    yes, but manually.... I need an automatic way to access the info from the internet...
    It's the first time I try something like this, so I have no idea of how to proceed. A sort of XML perhaps?...

    Author Comment

    ... and I need a way to read it from a function in Access...
    LVL 48

    Expert Comment

    by:Gustav Brock
    > yes, but manually....

    No, you can download the file or:

    Only you have access to your Datafeed. The Datafeed serves up a currency rate file in response to a standard HTTP GET request made by your server - a process many of our clients automate. When you register for the service, we assign you a unique URL where you can access the data, and you register the IP range from which you will make your request. If a request to that unique URL does not match the IP address you registered, the feed will block the access.

    I don't have an account so I don't know the details, but you can create a trial account and get all the support you need.

    It's quite easy to download a file:
    Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" ( _
      ByVal pCaller As Long, _
      ByVal szURL As String, _
      ByVal szFileName As String, _
      ByVal dwReserved As Long, _
      ByVal lpfnCB As Long) _
      As Long
    Public Function DownloadFile( _
      ByVal strURL As String, _
      ByVal strLocalFilename As String) _
      As Long
    ' Download file or page with public access from the web.
    ' 2004-12-17. Cactus Data ApS, CPH.
    ' Usage, download a file:
    ' lngRet = DownloadFile("", "c:\happybassett.jpg")
    ' Usage, download a page:
    ' lngRet = DownloadFile("", "c:\dbaconference.htm")
    ' Returns 0 if success, error code if not.
    ' Error codes:
    ' -2146697210 "file not found".
    ' -2146697211 "domain not found".
    ' Limitation.
    ' Does not check if local file was created successfully.
      Dim lngRetVal As Long
      lngRetVal = URLDownloadToFile(0, strURL & vbNullChar, strLocalFilename & vbNullChar, 0, 0)
      DownloadFile = lngRetVal
    End Function

    Open in new window

    LVL 74

    Accepted Solution

    The other issue is how often you will need the most recent exchange rates.
    Exchange rates are updated every 5 minutes in most cases.

    See here as well:

    Author Comment

    Seems interesting. I'm going to check it out.
    Sorry I'm taking so long to reply, but I´m very busy lately :(

    Expert Comment

    just wondering how you went with this? and if you got it to work?

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    This article is a continuation or rather an extension from Cascading Combos ( and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
    This isn't a frequent question on EE. I must have seen it three or four times (among several thousand questions). However, I use this trick quite often, most frequently as a delayed Current event. A form does not expose it's calculation dependenc…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now