Forum Academy Marketplace Showcase Pricing Features

MS Access connecting via API (using VBA)

Greetings,
Looking for the best method to send data to and from a MS Access database (linked to SQL server). Have been trying the Microsoft XML 6.0 object library without success. Is there a better method such as calls from SQL server?

This is a simple method for getting data out of Bubble.io

Public Function GetVehicleData()
Dim pHtml As String, strResponse As String, strFilter
strResponse = ""
    pHtml = "https://test.app/version-test/api/1.1/obj/vehicle?api_token=[APIKEY]"

    Dim oHttp As Object
    Set oHttp = CreateObject("Microsoft.XMLHTTP")
    Call oHttp.Open("GET", pHtml, False)
    oHttp.setRequestHeader "pragma", "no-cache"
    oHttp.setRequestHeader "cache-control", "no-cache"
    oHttp.setRequestHeader "If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT"
    oHttp.setRequestHeader "Content-Type", "application/json"
    oHttp.send
    strResponse = oHttp.responseText
    Set oHttp = Nothing
    Debug.Print strResponse 'Response needs to be parsed'
End Function