求助:实时错误‘-2147217904(80040e10)至少一个参数没有被指定值
Private Sub Command6_Click()Dim cn As New ADODB.Connection
Dim Res As New ADODB.Recordset
Dim sql As String
Dim insql As String
If TxtCenid.Text <> "" Then
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\法律条文.mdb;Mode=ReadWrite"
Set Res = New ADODB.Recordset
sql = "Select * From 基础表 Where ID=" & TxtCenid.Text
Res.Open sql, cn, 1, 3
If Res.RecordCount > 0 Then
insql = "Insert Into Back(书名,章,节,条文) values('" & Res.Fields("书名").Value & "','" & Res.Fields("章").Value & "','" & Res.Fields("节").Value & "','" & Res.Fields("条文").Value & "')"
cn.Execute insql
End If
Res.Close
Set Res = Nothing
End If
DataGrid1.AllowUpdate = True
TxtCenid.Text = ""
End Sub