Home > Software engineering >  Help: real-time error '- 2147217904-80040 (e10) at least one parameter is not specified values
Help: real-time error '- 2147217904-80040 (e10) at least one parameter is not specified values

Time:10-07

 Private Sub Command6_Click () 
Dim cn As New ADODB. Connection
Dim Res As New ADODB. You
Dim As SQL String
Dim insql As String
If TxtCenid. Text & lt;> "" Then
Cn. The Open ". The Provider=Microsoft Jet. The OLEDB. 4.0; Data Source="& amp; App. The Path & amp; "\ law. MDB. Mode=ReadWrite
"The Set Res=New ADODB. You
SQL="Select * From base table Where ID=" & amp; TxtCenid. Text
Res. The Open SQL, cn, 1, 3
If Res. RecordCount & gt; 0 Then
Insql="Insert Into the Back (the title, chapter, section, section) values ('" & amp; Res. Fields (" title "). The Value & amp; "', '" & amp; Res. Fields (" chapter "). The Value & amp; "', '" & amp; Res. Fields (" section "). The Value & amp; "', '" & amp; Res. Fields (" provisions "). The Value & amp; "')
"Cn. The Execute insql
End the If
Res. Close
The Set of Res=Nothing
End the If
DataGrid1. AllowUpdate=True
TxtCenid. Text=""
End Sub

CodePudding user response:

Try:
Insql="Insert Into [Back] (title, chapter, section, section) values ('" & amp; Res. Fields (" title "). The Value & amp; "', '" & amp; Res. Fields (" chapter "). The Value & amp; "', '" & amp; Res. Fields (" section "). The Value & amp; "', '" & amp; Res. Fields (" provisions "). The Value & amp; "')
"
  • Related