The code below giving error runtime 3061, expected1
Private Sub CmdSales_Click()
Dim d As New Dictionary, c As New Collection
Dim http As Object
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Dim JSON As Object
Dim i As Integer
Dim strSQL As String
Dim item As Object
strSQL = "SELECT * FROM [Qry1] WHERE [Qry1.INV] = " & Me.CboInv
Set rs = db.OpenRecordset(strSQL, dbOpenDynaset, dbSeeChanges)
http.Open "POST", "http://jsonplaceholder.typicode.com/customers/?id=" & Me.CboInv, False
http.send
Set JSON = ParseJson(http.responseText)
i = 2
For Each item In rs
d.Add "INV", "INV"
d.Add "Customer", "Customer"
d.Add "TaxId", "TaxId"
d.Add "Address", "Address"
d.Add "InvoiceDate", "InvoiceDate"
d.Add "Product", "Product"
d.Add "Qty", "Qty"
d.Add "Price", "Price"
d.Add "VAT", "Vat"
d.Add "TotalPrice", "TotalPrice"
Next
Dim jsonStr As String
jsonStr = ConvertToJson(c)
End Sub
I want to post the attached list in the code to link below:
The code below giving error runtime 3061, expected1
Private Sub CmdSales_Click() Dim d As New Dictionary, c As New Collection Dim http As Object Dim db As Database Dim rs As Recordset Set db = CurrentDb Dim JSON As Object Dim i As Integer Dim strSQL As String Dim item As Object strSQL = "SELECT * FROM [Qry1] WHERE [Qry1.INV] = " & Me.CboInv Set rs = db.OpenRecordset(strSQL, dbOpenDynaset, dbSeeChanges) http.Open "POST", "http://jsonplaceholder.typicode.com/customers/?id=" & Me.CboInv, False http.send Set JSON = ParseJson(http.responseText) i = 2 For Each item In rs d.Add "INV", "INV" d.Add "Customer", "Customer" d.Add "TaxId", "TaxId" d.Add "Address", "Address" d.Add "InvoiceDate", "InvoiceDate" d.Add "Product", "Product" d.Add "Qty", "Qty" d.Add "Price", "Price" d.Add "VAT", "Vat" d.Add "TotalPrice", "TotalPrice"
Next Dim jsonStr As String jsonStr = ConvertToJson(c) End Sub
I want to post the attached list in the code to link below:
http://jsonplaceholder.typicode.com/customers/