ms access 2007更新错误运行时错误3464,条件表达式中的数据类型不匹配

时间:2015-11-04 02:51:23

标签: ms-access-2007

我无法更新数据,它表示数据类型在标准扩展中不匹配

CurrentDb.Execute "UPDATE PC_Details " & _ " SET Serial_No=" & Me.txtNo & _ ", PC_Brand='" & Me.txtBrand & "'" & _ ", PC_Model='" & Me.txtModel & "'" & _ ", Status='" & Me.txtStatus & "'" & _ ", Description='" & Me.txtDesc & "'" & _ ", Staff_ID='" & Me.txtID & "'" & _ " WHERE Serial_No=" & Me.txtNo.Tag

1 个答案:

答案 0 :(得分:0)

执行此操作以进行调试:

Dim SQL As String
SQL = "UPDATE PC_Details " & _
                  " SET Serial_No=" & Me.txtNo & _
                  ", PC_Brand='" & Me.txtBrand & "'" & _
                  ", PC_Model='" & Me.txtModel & "'" & _
                  ", Status='" & Me.txtStatus & "'" & _
                  ", Description='" & Me.txtDesc & "'" & _
                  ", Staff_ID='" & Me.txtID & "'" & _
                  " WHERE Serial_No=" & Me.txtNo.Tag 
Debug.Print SQL
CurrentDb.Execute SQL

然后研究生成的SQL并在此处发布。

如果存在所有值,则一个或多个值是文本但是作为数字处理,反之亦然。