Dim Strtime As String, strmonth As String
If IsNull(Forms!窗体2!Combo5) or Forms! 窗体2!Combo5 = "" Then
MsgBox "表名不能为空", 48
Me.Combo5.SetFocus
Exit Sub
End If
strmonth = Month(Date)
If Len(strmonth) < 2 Then
strmonth = 0 & strmonth
End If
Strtime = Year(Date) & strmonth
DoCmd.RunSQL "Select 订单.* INTO " & Forms窗体2!Combo5 & "_" & Strtime & " FROM订单;"
MsgBox "新表生成完毕"