I have created a function in VBA to connect to a web service and retrieve an XML file. I then wanted to parse the XML and import the captured nodes into the SQL database.
I have managed to connect to the web service and parse the XML file and even show the values in a messagebox, but when i try and store the parameter via a SQL query, it asks me for a parameter value?
Example:
Set BodyStyle = domResponse.SelectSingleNode("/GetVehicles/DataArea/Vehicles/Vehicle/BodyStyle")
MsgBox (BodyStyle.Text)
DoCmd.RunSQL "INSERT INTO vHPI (BodyStyle) BodyStyle.Text"
The messagebox pops up with a value of MOTORCYCLE, but then i get a prompt asking me for a parameter for BodyStyle.Text
I dont understand how the system can show the parameter in a messagebox but say the parameter is empty when i want to insert it into the database?
Please help! Thanks Adam.