Private Sub ADD_Click() For i = 0 To 8 If Text1(i).Text = "" Then MsgBox "关键条目不能为空!" Exit Sub End If Next i For i = 12 To 13 If Text1(i).Text = "" Then MsgBox "关键条目不能为空!" Exit Sub End If Next i If Not IsNumeric(Trim(Text1(4).Text)) Then MsgBox "项目经费应该为数字!", vbOKOnly + vbExclamation, "警告!" Exit Sub End If Adodcb.Recordset.Update MsgBox "申报成功,我们会尽快处理您的信息!" Adodcb.Recordset.Close main.Show Unload MeEnd SubPrivate Sub Form_Load() Adodcb.Recordset.MoveLast Adodcb.Recordset.AddNew End SubPrivate Sub Form_Unload(Cancel As Integer) main.Show Unload Me End SubPrivate Sub quit_Click() main.Show Unload Me End SubPrivate Sub Text1_Change(Index As Integer)End Sub
Private Sub ADD_Click()
For i = 0 To 8
If Text1(i).Text = "" Then
MsgBox "关键条目不能为空!"
Exit Sub
End If
Next i
For i = 12 To 13
If Text1(i).Text = "" Then
MsgBox "关键条目不能为空!"
Exit Sub
End If
Next i
If Not IsNumeric(Trim(Text1(4).Text)) Then
MsgBox "项目经费应该为数字!", vbOKOnly + vbExclamation, "警告!"
Exit Sub
End If
Adodcb.Recordset.Update
MsgBox "申报成功,我们会尽快处理您的信息!"
Adodcb.Recordset.Close
main.Show
Unload MeEnd SubPrivate Sub Form_Load()
Adodcb.Recordset.MoveLast
Adodcb.Recordset.AddNew
End SubPrivate Sub Form_Unload(Cancel As Integer)
main.Show
Unload Me
End SubPrivate Sub quit_Click()
main.Show
Unload Me
End SubPrivate Sub Text1_Change(Index As Integer)End Sub