标题: 此代码如何添加??? [打印本页] 作者: lixiang_30 时间: 2010-10-18 10:30 标题: 此代码如何添加??? Private Sub Command6_Click()
Dim jitaixinghao As String '声明一个存放“机台型号”的数组
Dim Sql As String '声明一个SQL查询变量
jitaixinghao = Me.List15 '给机台型号表变量赋值
If MsgBox("是否确定要机台数据?", vbYesNo, "警告") = vbNo Then Exit Sub
Sql = "INSERT INTO 表1 ( 件号, 件名规格,日期) SELECT 件号,件名规格 FROM " & jitaixinghao
CurrentDb.Execute Sql
MsgBox "添加完毕.", vbInformation
Me.表1_子窗体.Requery
End Sub