Option Explicit
Private Sub Command1_Click()
   Dim strNews, i%
    strNews = Array("考勤月份", "姓名", "编号", "缺勤次数")
    For i = 0 To 3                      '验证设定的工资标准
    
        If Text1(i) = "" Then
            MsgBox strNews(i) & "级工资标准不能为空,且必须为数字", _
                   vbCritical, "职务工资标准设定"
            Text1(i).SetFocus
            Text1(i).SelStart = 0
            Text1(i).SelLength = Len(Text1(i))
            Exit Sub
        End If
    Next
    With Wage_Manage_Data.rsKaoWage
        If .RecordCount = 0 Then .AddNew
        .Fields("考勤月份") = Text1(0)
        .Fields("姓名") = Text1(1)
        .Fields("编号") = Text1(2)
        .Fields("缺勤次数") = Text1(3)
        .Update
    End With
    MsgBox "数据保存成功!", vbInformation, "考勤信息"
End SubPrivate Sub Command2_Click()
 Unload Me
End Sub
 If .RecordCount = 0 Then .AddNew对象关闭时  不允许操作这是为什么???