I keep getting the following errors while executing an UPDATE query inside the VBA code :banghead:
Too few parameters. Expected <number>. (Error 3061)
<Message> in query expression <expression>. (Error 3075) => syntax error (missing operator) query expression “test test”
The UPDATE query is
dbs.Execute ("UPDATE TableEmployee SET TableEmployee.Emp_Name = " & [searchEmpName] & " WHERE TableEmployee.Emp_Id = " & finalNumber & " ")
The variable “searchEmpName” contains the value from the text box on the form. This is a string (name of employee) and can be with space or with put space. If this field has NO space, the error is
Too few parameters. Expected <number>. (Error 3061)
If this field has space then error is
<Message> in query expression <expression>. (Error 3075) => syntax error (missing operator) query expression “test test”
Any help is highly appreciated.
Too few parameters. Expected <number>. (Error 3061)
<Message> in query expression <expression>. (Error 3075) => syntax error (missing operator) query expression “test test”
The UPDATE query is
dbs.Execute ("UPDATE TableEmployee SET TableEmployee.Emp_Name = " & [searchEmpName] & " WHERE TableEmployee.Emp_Id = " & finalNumber & " ")
The variable “searchEmpName” contains the value from the text box on the form. This is a string (name of employee) and can be with space or with put space. If this field has NO space, the error is
Too few parameters. Expected <number>. (Error 3061)
If this field has space then error is
<Message> in query expression <expression>. (Error 3075) => syntax error (missing operator) query expression “test test”
Any help is highly appreciated.