|
Private Sub Command41_Click()
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"
'rsmx.Close
End Sub
上面的是好的,下面的却..........
Private Sub Command42_Click()
Dim rsm As ADODB.Recordset
Dim mysql As String, aq As String
Dim tyu As String
tyu = Combo12.Value
Set rsm = New ADODB.Recordset
mysql = "select 日期,凭证编号,摘要,总帐科目,明细科目,借方金额,贷方金额 into aq from 清单 where 总帐科目 ='" & Combo12.Value & "'"
rsm.Open mysql, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
'更改表名"aq"为组合框的值"tyu产"
DoCmd.Rename tyu, acTable, "aq"
' rsmx.Close
End Sub
本想上传工程,太大,无法上传.奈何!!!!!!! |
|