|
求助,关于代码各位老大,请帮忙看看代码有什么错误,老是提醒一个参数未定义,其中“编号”为access中的自动编号类型,z:public z As Long
Private Sub 修改_Click()
Dim Conn As New ADODB.Connection: Dim Rec As New ADODB.Recordset: Dim strSQL As String: Set Conn = CurrentProject.Connection
strSQL = "SELECT * FROM 名称 where 编号 = z "
Rec.Open strSQL, Conn, adOpenKeyset, adLockOptimistic
名称.SetFocus: Rec.Fields("名称") = 名称.text
等级.SetFocus: Rec.Fields("等级") = 电压等级.text
Rec.Update: Rec.Close: Set Rec = Nothing
TreeView0.Nodes.Clear
Call Form_Load
End Sub |
|