运行时错误' 3061'。参数太少。预期1

时间:2016-02-17 13:46:46

标签: database vb.net ms-access

我在Microsoft Access 2010上有以下vb语句

CurrentDb.Execute "INSERT INTO Table3(Names,ID, center, village, association , BOD ) " & _
  " VALUES(" & Me.fullnametxt & ",'" & Me.worktxt & "','" & _
  Me.Combo39 & "','" & Me.assoctxt & "','" & Me.datetraintxt & "','" & Me.datetraintxt & "')"

生成

  

运行时错误' 3061'。参数太少。预计1。

1 个答案:

答案 0 :(得分:0)

你错过了一些引用:

CurrentDb.Execute "INSERT INTO Table3 ( Names, ID, center, village, association , BOD ) " & _
  " VALUES ('" & Me.fullnametxt & "','" & Me.worktxt & "','" & _
  Me.Combo39 & "','" & Me.assoctxt & "','" & Me.datetraintxt & "','" & Me.datetraintxt & "')"