从宏更新Access数据库

时间:2018-10-26 08:36:37

标签: access-vba

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

0 个答案:

没有答案