【正文】
End If = A Set Money1 = ExeCutesql(select sum(金額 ) from 支出 where 日期 between 39。 amp。 Cdate1 amp。 39。and 39。 amp。 Cdate2 amp。 39。, ) B = (0) If IsNull(B) Then B = 0 End If = B C = A B If C 0 Then D = 富裕 Else D = 超支 End If = Format(Cdate1, yyyy年 mm月 ) amp。 , amp。 本月你 amp。 D amp。 C amp。 元! Else Year1 = Year(Now) Month1 = Month(Now) Riqi = Year1 amp。 amp。 Month1 Riqi1 = Year1 amp。 amp。 Month1 + 1 Set Mydb = ExeCutesql(select * from 收入 where 日期 between 39。 amp。 Format(Riqi, yyyymm) amp。 39。and 39。 amp。 Format(Riqi1, yyyymm) amp。 39。, Str_text) Set = Mydb Set = Mydb1 Set Money = ExeCutesql(select sum(金額 ) from 收入 where 日期 between 39。 amp。 Format(Riqi, yyyymm) amp。 39。and 39。 amp。 Format(Riqi1, yyyymm) amp。 39。, ) A = (0) If IsNull(A) Then A = 0 End If = A Set Money1 = ExeCutesql(select sum(金額 ) from 支出 where 日期 between 39。 amp。 Format(Riqi, yyyymm) amp。 39。and 39。 amp。 Format(Riqi1, yyyymm) amp。 39。, ) B = (0) If IsNull(B) Then B = 0 End If = B C = A B If C 0 Then D = 富裕 Else D = 超支 End If = Year(Now) amp。 年 amp。 Month(Now) amp。 月 amp。 , amp。 本月你 amp。 D amp。 C amp。 元! End If End Sub Private Sub Form_Load() On Error Resume Next Dim A, B, C As Integer Dim D As String Dim Year1, Month1, Riqi, Riqi1, Riqi3, Riqi4 Year1 = Year(Now) Month1 = Month(Now) Riqi = Year1 amp。 amp。 Month1 Riqi1 = Year1 amp。 amp。 Month1 + 1 Set Mydb = ExeCutesql(select * from 收入 where 日期 between 39。 amp。 Format(Riqi, yyyymm) amp。 39。and 39。 amp。 Format(Riqi1, yyyymm) amp。 39。, Str_text) Set = Mydb Set Mydb1 = ExeCutesql(select * from 支出 where 日期 between 39。 amp。 Format(Riqi, yyyymm) amp。 39。and 39。 amp。 Format(Riqi1, yyyymm) amp。 39。, Str_text) Set = Mydb1 Set Money = ExeCutesql(select sum(金額 ) from 收入 where 日期 between 39。 amp。 Format(Riqi, yyyymm) amp。 39。and 39。 amp。 Format(Riqi1, yyyymm) amp。 39。, ) A = (0) If IsNull(A) Then A = 0 End If = A Set Money1 = ExeCutesql(select sum(金額 ) from 支出 where 日期 between 39。 amp。 Format(Riqi, yyyymm) amp。 39。and 39。 amp。 Format(Riqi1, yyyymm) amp。 39。, ) B = (0) If IsNull(B) Then B = 0 End If = B C = A B If C 0 Then D = 富裕 Else D = 超支 End If = Year(Now) amp。 年 amp。 Month(Now) amp。 月 amp。 , amp。 本月你 amp。 D amp。 C amp。 元! End Sub Dim Mydb As New Dim Mydb1 As New Dim Mydb2 As New Dim Mydb3 As New Dim Mydb4 As New Dim Money As New Dim Key1 As New Dim Note As New Dim Count1 As New Dim AA As New Dim BB As New Dim Str_text As String Dim Balance As Integer Dim Panduan As Boolean Dim Panduan1 As Boolean Dim Yuen As Integer Private Sub Combo1_Click() Call Wangge End Sub Private Sub Command1_Click() Call Atrue = = = = = = Date Panduan1 = True End Sub Private Sub Command10_Click() Unload Me End Sub Private Sub Command11_Click() On Error Resume Next Dim A, B, C, D, E, F, Key Set Count1 = ExeCutesql(select key from 活期存取 , Str_text) If Then E = Null End If If IsNull(E) Then Key = 1 Else Key = (0) + 1 End If Set Note = ExeCutesql(select 余額 from 活期存取 , Str_text) If Then D = Null End If If IsNull(D) Then Set Money = ExeCutesql(select 款額 from 活期帳戶 where 銀行帳號(hào) =39。 amp。 amp。 39。, Str_text) C = (0) Balance = C Else Balance = (0) End If If Len() = 0 Then MsgBox 請(qǐng)選擇銀行賬號(hào)! , vbOKOnly + 32 End If A = MsgBox(是否添加此條記錄? , vbYesNo + 32, 添加記錄 ) If A = vbYes Then If Panduan = True Then Balance = Balance CInt() ExeCutesql insert into 活期存取 values(39。 amp。 amp。 39。,39。取款39。, amp。 amp。 ,39。 _ amp。 Format(, yyyymmdd) amp。 39。,39。 amp。 amp。 39。,39。 amp。 Balance amp。 39。,39。 amp。 Key amp。 39。), Str_text Call Wangge = False = False = = MsgBox 數(shù)據(jù)添加成功! , vbOKOnly, 成功 Else