|
Private Sub Command21_Click()
Dim cnnmx As ADODB.Connection
Dim rsmx As ADODB.Recordset
Dim mysql As String, aq As String
Dim tyu产 As String
tyu产 = Combo12.Value
Set rsmx = New ADODB.Recordset
mysql = "select 科目编码 into aq from 总帐科目表 where 总帐科目 ='" & Combo12.Value & "'"
rsmx.Open mysql, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
'更改表名"aq"为组合框的值"tyu产"
DoCmd.Rename tyu产, acTable, "aq"
End Sub
上面这段通过测试,下面这段提示错误"至少有一个参数没有没有指定值",这是为何???
Private Sub Command21_Click()
Dim cnnmx As ADODB.Connection
Dim asas As String
Dim rsmx As ADODB.Recordset
Dim mxkm(500) As String, i As Integer, mysql As String, aq As String
Dim tyu产 As String
tyu产 = Combo22.Value
Set rsmx = New ADODB.Recordset
Set cnnmx = New ADODB.Connection
mysql = "select 日期 ,凭证编号,摘要,总帐科目,明细科目,借方金额,贷方金额 into aq from 清单的 where 总帐科目 ='" & Combo22.Value & "'"
rsmx.Open mysql, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
'更改表名"aq"为组合框的值"tyu产"
DoCmd.Rename tyu产, acTable, "aq"
End Sub |
|