Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,511

    Why not have the Excel spreadsheet linked directly to Access as a separate Table. Then in a query you can join it to what ever other data you have. The excel file does not need to be open for this type of set up.

    https://support.microsoft.com/en-us/...d-e084913cc958

  2. #17
    samsquared is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    May 2021
    Location
    St. Augustine, FL
    Posts
    12
    I can't get the Michael Saunders method to work presumably because I'm using Excel 2010 (it says 2013 and above). So, I went to the Google sheet to add some stocks. I see them in the Excel spreadsheet, but my linked Access table now just has #ERROR in each cell. I tried to re-link the spreadsheet but am getting a message saying "the connection for viewing your linked microsoft excel worksheet was lost" and so far I've been unable to fix that.

  3. #18
    samsquared is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    May 2021
    Location
    St. Augustine, FL
    Posts
    12
    I figured out how to do this directly from MS Access without using Google sheets or Excel. Finnhub.io lets you get a free api key so you can access a portion of their content. Fortunately, it includes access to stock quotes.


    You'll need to create an MSXML2.XMLHTTP object, do the send, and parse the result string. The format of the call I do is like this one for Exxon:


    Code:
    "https://finnhub.io/api/v1/quote?symbol=XOM&token=MyAPITokenGoesHere&rnd=615903378"

    Note the extra parm on the end. I discovered that re-sending the request yields the same return value because it's cached. There are trickier ways to address this but the easiest is to add an extra parm (I generate a random number each time - using 'rnd' was just my choice) thus making the call unique. It works!


    Finnhub limits free accounts to 60 calls/minute which isn't a problem for me. For dividend info I use Polygon.io which restricts free account calls to 5 calls/minute which is somewhat inconvenient, but dividend information doesn't change very often for the stocks I track.


    So, for free:
    Finnhub gets you quotes and access to basic stock info like 52-week highs and lows and quotes, but no dividends.
    Polygon gets you dividend info but no quotes.


    Hope this helps. I can post some sample code if anyone wants.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 04-02-2019, 06:45 AM
  2. Market Data Retrieval
    By Grefcon901 in forum Access
    Replies: 16
    Last Post: 04-07-2016, 01:59 PM
  3. Replies: 22
    Last Post: 12-20-2015, 02:46 AM
  4. Replies: 1
    Last Post: 07-11-2012, 01:42 PM
  5. Calculating Current Stock in Inventory/Warehouse
    By yohansetiawan in forum Access
    Replies: 5
    Last Post: 03-14-2012, 09:05 PM

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