Dim stDocName As String
'去掉警告提示
DoCmd.SetWarnings False
stDocName = "INSERT INTO tbl类别年限 ( 年度, ID,人员类别 ) SELECT " & Me.UpDown8.Value & " AS 年度, qry两层_实力.id ,'0000' as 人员类别 FROM qry两层_实力 LEFT JOIN qry类别年限年度 ON qry两层_实力.id = qry类别年限年度.ID WHERE (((qry类别年限年度.ID) Is Null))"
DoCmd.RunSQL stDocName