Syntax question: I am using the code below to call a query in Access VBA
strSQL = "INSERT INTO tblLoanDetails ([ServerName]) VALUES ('Test') WHERE [ID]=3"
Call CurrentDb.Execute(strSQL)
And i am getting a runtime error of "3067: Query must contain atleast one table or query."
the insert statement string looks like this (Threw the var into a text box):
INSERT INTO tblLoanDetails ([ServerName]) VALUES ('Test') WHERE [ID]=3
I also tried adding a semi-colon to the end but with no luck. I also double checked to make sure my table is called tblLoanDetails and my Column names are ServerName, and ID
Appreciate any help.