Dim deliveryCode As String
Set dbname = CurrentDb()
deliveryCode = 334
dbname.Execute "Update orderEntry set delivery= " & deliveryCode & " where ID=1"
当deliveryCode值为整数时,以上代码可以正常工作,但是将deliveryCode值更改为字符串后,出现错误:
Run time error 3061 Too few parameters Expected 1