|
本帖最后由 g7235723 于 2009-4-8 09:22 编辑
Sub Command9_Click()
On Error GoTo Err_Command9_Click
Dim tablename As String
Dim lable As String
tablename = Me.Combo0 & "工艺"
lable = Me.Combo0
SQL = " Create Table " & tablename & "(ID Counter,Name string,Des string,[Date] DateTime)"
CurrentDb.Execute SQL
SQL = "INSERT INTO " & tablename & " ( Name, Des ) SELECT 项目.工令, 工艺表.品名 FROM 工艺表, 项目 WHERE 工令 = lable ;"
CurrentDb.Execute SQL
Exit_Command9_Click:
Exit Sub
Err_Command9_Click:
MsgBox Err.Description
Resume Exit_Command9_Click
End Sub
第二句SQL执行老是出错"参数不足,期待是1"
请帮忙看看是哪里的问题. |
|