家庭收支理财管理系统 Access数据库系统课程设计制作实例(家庭收支管理系统java)

家庭收支理财管理系统 Access数据库系统课程设计制作实例(家庭收支管理系统java)

本系统包含主要功能有:家庭成员管理,收支管理,理财管理,存款管理,收支统计,理财统计,存款统计,生成报表。

商品中包含简要的设计报告(功能模块图,业务流程图,UC矩阵,数据流图,数据字典,E-R图等)和制作截图文档。

数据库系统包含:表,查询,窗体,报表,VBA代码

系统为单机使用的access数据库系统,可作为课程学习实例使用。

设计部分

功能模块图

家庭收支理财管理系统 Access数据库系统课程设计制作实例(家庭收支管理系统java)

业务流程图

家庭收支理财管理系统 Access数据库系统课程设计制作实例(家庭收支管理系统java)

数据流程

家庭收支理财管理系统 Access数据库系统课程设计制作实例(家庭收支管理系统java)

E-R图

家庭收支理财管理系统 Access数据库系统课程设计制作实例(家庭收支管理系统java)

程序流程图

家庭收支理财管理系统 Access数据库系统课程设计制作实例(家庭收支管理系统java)

关系模型

理财(家庭成员,理财项目,理财内容,开始日期,结束日期,本金,收益率,收入,备注)

收支(日期,类型,家庭成员,项目,内容,收入金额,支出金额,备注)

家庭成员(姓名,性别,家庭关系,生日,职业状态,联系方式,备注)

存款(账户,户名,存取类型,存入,取出,日期,备注)

系统部分

表关系

家庭收支理财管理系统 Access数据库系统课程设计制作实例(家庭收支管理系统java)

窗体

家庭收支理财管理系统 Access数据库系统课程设计制作实例(家庭收支管理系统java)

VBA代码

系统主页

Private Sub Command参数设置_Click()

Me.显示界面子窗体.SourceObject = "参数设置"

Me.显示界面子窗体.SetFocus

End Sub

Private Sub Command存款管理_Click()

Me.显示界面子窗体.SourceObject = "存款管理"

Me.显示界面子窗体.SetFocus

End Sub

Private Sub Command存款统计_Click()

Me.显示界面子窗体.SourceObject = "存款统计查询"

Me.显示界面子窗体.SetFocus

End Sub

Private Sub Command家庭成员管理_Click()

Me.显示界面子窗体.SourceObject = "家庭成员管理"

Me.显示界面子窗体.SetFocus

End Sub

Private Sub Command理财管理_Click()

Me.显示界面子窗体.SourceObject = "理财管理"

Me.显示界面子窗体.SetFocus

End Sub

Private Sub Command理财统计_Click()

Me.显示界面子窗体.SourceObject = "理财统计查询"

Me.显示界面子窗体.SetFocus

End Sub

Private Sub Command收支管理_Click()

Me.显示界面子窗体.SourceObject = "收支管理"

Me.显示界面子窗体.SetFocus

End Sub

Private Sub Command收支统计查询_Click()

Me.显示界面子窗体.SourceObject = "收支统计查询"

Me.显示界面子窗体.SetFocus

End Sub

Private Sub Command退出系统_Click()

If MsgBox("是否退出系统", vbYesNo) <> vbYes Then

Exit Sub

End If

Application.Quit acQuitSaveAll

End Sub

Private Sub Command系统后台_Click()

DoCmd.Close acForm, Me.Name

DoCmd.SelectObject acForm, , True

End Sub

存款管理

Option Compare Database

Private Sub Command报表_Click()

If Me.数据表子窗体.Form.FilterOn = True Then

DoCmd.OpenReport "存款记录报表", acViewReport, , Me.数据表子窗体.Form.Filter

Else

DoCmd.OpenReport "存款记录报表", acViewReport

End If

End Sub

Private Sub Command查询_Click()

On Error GoTo 结束查询

If 查询内容 <> "" And IsNull(查询内容) = False And 查询字段 <> "" And IsNull(查询字段) = False Then

If 查询字段.Value = "日期" Then

Me.数据表子窗体.Form.Filter = Me.查询字段 & " =#" & Me.查询内容 & "#"

Me.数据表子窗体.Form.FilterOn = True

Me.数据表子窗体.Requery

Exit Sub

End If

If 查询字段.Value = "存入" Or 查询字段.Value = "取出" Then

Me.数据表子窗体.Form.Filter = Me.查询字段 & ">= " & Me.查询内容

Me.数据表子窗体.Form.FilterOn = True

Me.数据表子窗体.Requery

Exit Sub

End If

Me.数据表子窗体.Form.Filter = Me.查询字段 & " like '*" & Me.查询内容 & "*'"

Me.数据表子窗体.Form.FilterOn = True

Me.数据表子窗体.Requery

Else

Me.数据表子窗体.Form.FilterOn = False

Me.数据表子窗体.Requery

End If

Exit Sub

结束查询:

MsgBox Err.Description

End Sub

Private Sub Command清空_Click()

账户.Value = ""

户名.Value = ""

存取类型.Value = ""

存入.Value = ""

取出.Value = ""

日期.Value = ""

备注.Value = ""

账户余额.Value = ""

End Sub

Private Sub Command全部_Click()

Me.数据表子窗体.Form.FilterOn = False

Me.数据表子窗体.Requery

End Sub

Private Sub Command添加_Click()

If 账户 = "" Or IsNull(账户) = True Then

MsgBox "账户值为空!"

Exit Sub

End If

If 户名 = "" Or IsNull(户名) = True Then

MsgBox "户名值为空!"

Exit Sub

End If

If 存取类型 = "" Or IsNull(存取类型) = True Then

MsgBox "存取类型值为空!"

Exit Sub

End If

If 存入 = "" Or IsNull(存入) = True Then

MsgBox "存入值为空!"

Exit Sub

End If

If 取出 = "" Or IsNull(取出) = True Then

MsgBox "取出值为空!"

Exit Sub

End If

If 日期 = "" Or IsNull(日期) = True Then

MsgBox "日期值为空!"

Exit Sub

End If

Dim add_rs As DAO.Recordset

Set add_rs = CurrentDb.OpenRecordset("存款表", dbOpenTable)

With add_rs

.AddNew

!账户.Value = 账户.Value

!户名.Value = 户名.Value

!存取类型.Value = 存取类型.Value

!存入.Value = 存入.Value

!取出.Value = 取出.Value

!日期.Value = 日期.Value

!备注.Value = 备注.Value

.Update

.Close

End With

Set add_rs = Nothing

MsgBox "添加完成"

Me.数据表子窗体.Form.Requery

End Sub

Private Sub 账户_Change()

If 账户 <> "" Then

账户余额.Value = Nz(DLookup("余额", "存款统计查询", "账户='" & Me.账户 & "'"), 0)

Else

账户余额.Value = ""

End If

End Sub

存款数据表

Private Sub Form_BeforeUpdate(Cancel As Integer)

If 账户.Value <> "" And 户名.Value <> "" And 存取类型.Value <> "" And 存入.Value <> "" And 取出.Value <> "" And 日期.Value <> "" Then

On Error GoTo 数据更新前提醒_Err

If (MsgBox("是否保存对记录的修改", 1, "修改记录提醒") = 1) Then

Beep

Else

DoCmd.RunCommand acCmdUndo

End If

Else

MsgBox "账户,户名,存取类型,存入,取出,日期都不能为空"

On Error Resume Next

DoCmd.RunCommand acCmdUndo

Exit Sub

End If

数据更新前提醒_Exit:

Exit Sub

数据更新前提醒_Err:

MsgBox Error$

Resume 数据更新前提醒_Exit

End Sub

Private Sub 存款ID_DblClick(Cancel As Integer)

If MsgBox("是否删除该记录:" & Me.存款ID & "?", vbYesNo) = vbYes Then

DoCmd.SetWarnings (False)

Dim del_sql As String

del_sql = "Delete From 存款表 Where 存款ID = " & 存款ID

DoCmd.RunSQL del_sql

Me.Requery

End If

End Sub

存款统计查询

Private Sub Command报表_Click()

If Me.数据表子窗体.Form.FilterOn = True Then

DoCmd.OpenReport "存款统计报表", acViewReport, , Me.数据表子窗体.Form.Filter

Else

DoCmd.OpenReport "存款统计报表", acViewReport

End If

End Sub

Private Sub Command查询_Click()

On Error GoTo 结束查询

If 查询内容 <> "" And IsNull(查询内容) = False And 查询字段 <> "" And IsNull(查询字段) = False Then

If 查询字段.Value = "日期" Then

Me.数据表子窗体.Form.Filter = Me.查询字段 & " =#" & Me.查询内容 & "#"

Me.数据表子窗体.Form.FilterOn = True

Me.数据表子窗体.Requery

Exit Sub

End If

If 查询字段.Value = "存入合计" Or 查询字段.Value = "取出合计" Then

Me.数据表子窗体.Form.Filter = Me.查询字段 & ">= " & Me.查询内容

Me.数据表子窗体.Form.FilterOn = True

Me.数据表子窗体.Requery

Exit Sub

End If

Me.数据表子窗体.Form.Filter = Me.查询字段 & " like '*" & Me.查询内容 & "*'"

Me.数据表子窗体.Form.FilterOn = True

Me.数据表子窗体.Requery

Else

Me.数据表子窗体.Form.FilterOn = False

Me.数据表子窗体.Requery

End If

Exit Sub

结束查询:

MsgBox Err.Description

End Sub

Private Sub Command全部_Click()

Me.数据表子窗体.Form.FilterOn = False

Me.数据表子窗体.Requery

End Sub

家庭成员查询数据表

Private Sub Form_BeforeUpdate(Cancel As Integer)

If 姓名.Value <> "" And 性别.Value <> "" And 家庭关系.Value <> "" And 生日.Value <> "" And 职业状态.Value <> "" And 联系方式.Value <> "" Then

On Error GoTo 数据更新前提醒_Err

If (MsgBox("是否保存对记录的修改", 1, "修改记录提醒") = 1) Then

Beep

Else

DoCmd.RunCommand acCmdUndo

End If

Else

MsgBox "姓名,性别,家庭关系,生日,职业状态,联系方式都不能为空"

On Error Resume Next

DoCmd.RunCommand acCmdUndo

Exit Sub

End If

数据更新前提醒_Exit:

Exit Sub

数据更新前提醒_Err:

MsgBox Error$

Resume 数据更新前提醒_Exit

End Sub

Private Sub 姓名_DblClick(Cancel As Integer)

If MsgBox("是否删除该记录:" & Me.姓名 & "?注意:删除家庭成员后涉及关联的收支理财等记录也会被删除", vbYesNo) = vbYes Then

DoCmd.SetWarnings (False)

Dim del_sql As String

del_sql = "Delete From 家庭成员表 Where 姓名 = '" & 姓名 & "'"

DoCmd.RunSQL del_sql

Me.Requery

End If

End Sub

家庭成员管理

Option Compare Database

Private Sub Command报表_Click()

If Me.数据表子窗体.Form.FilterOn = True Then

DoCmd.OpenReport "家庭成员标签", acViewReport, , Me.数据表子窗体.Form.Filter

Else

DoCmd.OpenReport "家庭成员标签", acViewReport

End If

End Sub

Private Sub Command查询_Click()

On Error GoTo 结束查询

If 查询内容 <> "" And IsNull(查询内容) = False And 查询字段 <> "" And IsNull(查询字段) = False Then

Me.数据表子窗体.Form.Filter = Me.查询字段 & " like '*" & Me.查询内容 & "*'"

Me.数据表子窗体.Form.FilterOn = True

Me.数据表子窗体.Requery

Else

Me.数据表子窗体.Form.FilterOn = False

Me.数据表子窗体.Requery

End If

Me.数据表子窗体.SetFocus

Exit Sub

结束查询:

MsgBox Err.Description

End Sub

Private Sub Command清空_Click()

姓名.Value = ""

性别.Value = ""

家庭关系.Value = ""

生日.Value = ""

职业状态.Value = ""

联系方式.Value = ""

备注.Value = ""

End Sub

Private Sub Command全部_Click()

Me.数据表子窗体.Form.FilterOn = False

Me.数据表子窗体.Requery

End Sub

Private Sub Command添加_Click()

If 姓名 = "" Or IsNull(姓名) = True Then

MsgBox "姓名值为空!"

Exit Sub

End If

If 性别 = "" Or IsNull(性别) = True Then

MsgBox "性别值为空!"

Exit Sub

End If

If 家庭关系 = "" Or IsNull(家庭关系) = True Then

MsgBox "家庭关系值为空!"

Exit Sub

End If

If 生日 = "" Or IsNull(生日) = True Then

MsgBox "生日值为空!"

Exit Sub

End If

If 职业状态 = "" Or IsNull(职业状态) = True Then

MsgBox "职业状态值为空!"

Exit Sub

End If

If 联系方式 = "" Or IsNull(联系方式) = True Then

MsgBox "联系方式值为空!"

Exit Sub

End If

If Nz(DCount("姓名", "家庭成员表", "姓名='" & Me.姓名 & "'"), 0) > 0 Then

MsgBox "该家庭成员姓名已存在!不能重复"

Exit Sub

End If

On Error Resume Next

DoCmd.SetWarnings (False)

Dim add_sql As String

add_sql = "Insert Into 家庭成员表 (姓名,性别,家庭关系,生日,职业状态,联系方式,备注) Values ('" & 姓名 & "','" & 性别 & "','" & 家庭关系 & "',#" & 生日 & "#,'" & 职业状态 & "','" & 联系方式 & "','" & 备注 & "')"

DoCmd.RunSQL add_sql

MsgBox "添加完成"

Me.数据表子窗体.Form.Requery

End Sub

理财管理

Option Compare Database

Private Sub Command报表_Click()

If Me.数据表子窗体.Form.FilterOn = True Then

DoCmd.OpenReport "理财记录报表", acViewReport, , Me.数据表子窗体.Form.Filter

Else

DoCmd.OpenReport "理财记录报表", acViewReport

End If

End Sub

Private Sub Command查询_Click()

On Error GoTo 结束查询

If 查询内容 <> "" And IsNull(查询内容) = False And 查询字段 <> "" And IsNull(查询字段) = False Then

If 查询字段.Value = "日期" Then

Me.数据表子窗体.Form.Filter = Me.查询字段 & " =#" & Me.查询内容 & "#"

Me.数据表子窗体.Form.FilterOn = True

Me.数据表子窗体.Requery

Exit Sub

End If

If 查询字段.Value = "本金" Or 查询字段.Value = "收入" Then

Me.数据表子窗体.Form.Filter = Me.查询字段 & ">= " & Me.查询内容

Me.数据表子窗体.Form.FilterOn = True

Me.数据表子窗体.Requery

Exit Sub

End If

Me.数据表子窗体.Form.Filter = Me.查询字段 & " like '*" & Me.查询内容 & "*'"

Me.数据表子窗体.Form.FilterOn = True

Me.数据表子窗体.Requery

Else

Me.数据表子窗体.Form.FilterOn = False

Me.数据表子窗体.Requery

End If

Exit Sub

结束查询:

MsgBox Err.Description

End Sub

Private Sub Command清空_Click()

家庭成员.Value = ""

理财项目.Value = ""

理财内容.Value = ""

开始日期.Value = ""

结束日期.Value = ""

本金.Value = ""

收益率.Value = ""

收入.Value = ""

备注.Value = ""

End Sub

Private Sub Command全部_Click()

Me.数据表子窗体.Form.FilterOn = False

Me.数据表子窗体.Requery

End Sub

Private Sub Command收入收益率_Click()

If Me.收入 <> "" And Me.本金 <> "" And Me.本金 <> 0 Then

Me.收益率 = Me.收入 / Me.本金

Else

Me.收益率 = ""

End If

End Sub

Private Sub Command收益率收入_Click()

If Me.收益率 <> "" And Me.本金 <> "" Then

Me.收入 = Me.收益率 * Me.本金

Else

Me.收入 = ""

End If

End Sub

Private Sub Command添加_Click()

If 家庭成员 = "" Or IsNull(家庭成员) = True Then

MsgBox "家庭成员值为空!"

Exit Sub

End If

If 理财项目 = "" Or IsNull(理财项目) = True Then

MsgBox "理财项目值为空!"

Exit Sub

End If

If 理财内容 = "" Or IsNull(理财内容) = True Then

MsgBox "理财内容值为空!"

Exit Sub

End If

If 开始日期 = "" Or IsNull(开始日期) = True Then

MsgBox "开始日期值为空!"

Exit Sub

End If

If 结束日期 = "" Or IsNull(结束日期) = True Then

MsgBox "结束日期值为空!"

Exit Sub

End If

If 本金 = "" Or IsNull(本金) = True Then

MsgBox "本金值为空!"

Exit Sub

End If

If 收益率 = "" Or IsNull(收益率) = True Then

MsgBox "收益率值为空!"

Exit Sub

End If

If 收入 = "" Or IsNull(收入) = True Then

MsgBox "收入值为空!"

Exit Sub

End If

Dim add_rs As DAO.Recordset

Set add_rs = CurrentDb.OpenRecordset("理财表", dbOpenTable)

With add_rs

.AddNew

!家庭成员.Value = 家庭成员.Value

!理财项目.Value = 理财项目.Value

!理财内容.Value = 理财内容.Value

!开始日期.Value = 开始日期.Value

!结束日期.Value = 结束日期.Value

!本金.Value = 本金.Value

!收益率.Value = 收益率.Value

!收入.Value = 收入.Value

!备注.Value = 备注.Value

.Update

.Close

End With

Set add_rs = Nothing

MsgBox "添加完成"

Me.数据表子窗体.Form.Requery

End Sub

理财数据表

Private Sub Form_BeforeUpdate(Cancel As Integer)

If 家庭成员.Value <> "" And 理财项目.Value <> "" And 理财内容.Value <> "" And 开始日期.Value <> "" And 结束日期.Value <> "" And 本金.Value <> "" And 收益率.Value <> "" And 收入.Value <> "" Then

On Error GoTo 数据更新前提醒_Err

If (MsgBox("是否保存对记录的修改", 1, "修改记录提醒") = 1) Then

Beep

Else

DoCmd.RunCommand acCmdUndo

End If

Else

MsgBox "家庭成员,理财项目,理财内容,开始日期,结束日期,本金,收益率,收入都不能为空"

On Error Resume Next

DoCmd.RunCommand acCmdUndo

Exit Sub

End If

Exit Sub

数据更新前提醒_Err:

MsgBox Error$

End Sub

Private Sub 理财ID_DblClick(Cancel As Integer)

If MsgBox("是否删除该记录:" & Me.理财ID & "?", vbYesNo) = vbYes Then

DoCmd.SetWarnings (False)

Dim del_sql As String

del_sql = "Delete From 理财表 Where 理财ID = " & 理财ID

DoCmd.RunSQL del_sql

Me.Requery

End If

End Sub

理财统计查询

Private Sub Command报表_Click()

If Me.数据表子窗体.Form.FilterOn = True Then

DoCmd.OpenReport "理财统计报表", acViewReport, , Me.数据表子窗体.Form.Filter

Else

DoCmd.OpenReport "理财统计报表", acViewReport

End If

End Sub

Private Sub Command查询_Click()

On Error GoTo 结束查询

If 查询内容 <> "" And IsNull(查询内容) = False And 查询字段 <> "" And IsNull(查询字段) = False Then

If 查询字段.Value = "日期" Then

Me.数据表子窗体.Form.Filter = Me.查询字段 & " =#" & Me.查询内容 & "#"

Me.数据表子窗体.Form.FilterOn = True

Me.数据表子窗体.Requery

Exit Sub

End If

If 查询字段.Value = "本金合计" Or 查询字段.Value = "收入合计" Or 查询字段.Value = "平均收益率" Then

Me.数据表子窗体.Form.Filter = Me.查询字段 & ">= " & Me.查询内容

Me.数据表子窗体.Form.FilterOn = True

Me.数据表子窗体.Requery

Exit Sub

End If

Me.数据表子窗体.Form.Filter = Me.查询字段 & " like '*" & Me.查询内容 & "*'"

Me.数据表子窗体.Form.FilterOn = True

Me.数据表子窗体.Requery

Else

Me.数据表子窗体.Form.FilterOn = False

Me.数据表子窗体.Requery

End If

Exit Sub

结束查询:

MsgBox Err.Description

End Sub

Private Sub Command全部_Click()

Me.数据表子窗体.Form.FilterOn = False

Me.数据表子窗体.Requery

End Sub

理财项目数据表

Private Sub Form_BeforeUpdate(Cancel As Integer)

If 理财项目.Value <> "" Then

On Error GoTo 数据更新前提醒_Err

If (MsgBox("是否保存对记录的修改", 1, "修改记录提醒") = 1) Then

Beep

Else

DoCmd.RunCommand acCmdUndo

End If

Else

MsgBox "理财项目不能为空"

On Error Resume Next

DoCmd.RunCommand acCmdUndo

Exit Sub

End If

Exit Sub

数据更新前提醒_Err:

MsgBox Error$

End Sub

Private Sub 理财项目_DblClick(Cancel As Integer)

If MsgBox("是否删除该记录:" & Me.理财项目 & "?", vbYesNo) = vbYes Then

DoCmd.SetWarnings (False)

Dim del_sql As String

del_sql = "Delete From 理财项目表 Where 理财项目 = '" & Me.理财项目 & "'"

DoCmd.RunSQL del_sql

Me.Requery

End If

End Sub

收支管理

Option Compare Database

Private Sub Command报表_Click()

If Me.数据表子窗体.Form.FilterOn = True Then

DoCmd.OpenReport "收支记录报表", acViewReport, , Me.数据表子窗体.Form.Filter

Else

DoCmd.OpenReport "收支记录报表", acViewReport

End If

End Sub

Private Sub Command查询_Click()

On Error GoTo 结束查询

If 查询内容 <> "" And IsNull(查询内容) = False And 查询字段 <> "" And IsNull(查询字段) = False Then

If 查询字段.Value = "日期" Then

Me.数据表子窗体.Form.Filter = Me.查询字段 & " =#" & Me.查询内容 & "#"

Me.数据表子窗体.Form.FilterOn = True

Me.数据表子窗体.Requery

Exit Sub

End If

If 查询字段.Value = "收入" Or 查询字段.Value = "支出" Then

Me.数据表子窗体.Form.Filter = Me.查询字段 & ">= " & Me.查询内容

Me.数据表子窗体.Form.FilterOn = True

Me.数据表子窗体.Requery

Exit Sub

End If

Me.数据表子窗体.Form.Filter = Me.查询字段 & " like '*" & Me.查询内容 & "*'"

Me.数据表子窗体.Form.FilterOn = True

Me.数据表子窗体.Requery

Else

Me.数据表子窗体.Form.FilterOn = False

Me.数据表子窗体.Requery

End If

Exit Sub

结束查询:

MsgBox Err.Description

End Sub

Private Sub Command清空_Click()

日期.Value = ""

类型.Value = ""

家庭成员.Value = ""

项目.Value = ""

内容.Value = ""

收入.Value = ""

支出.Value = ""

备注.Value = ""

End Sub

Private Sub Command全部_Click()

Me.数据表子窗体.Form.FilterOn = False

Me.数据表子窗体.Requery

End Sub

Private Sub Command添加_Click()

If 日期 = "" Or IsNull(日期) = True Then

MsgBox "日期值为空!"

Exit Sub

End If

If 类型 = "" Or IsNull(类型) = True Then

MsgBox "类型值为空!"

Exit Sub

End If

If 家庭成员 = "" Or IsNull(家庭成员) = True Then

MsgBox "家庭成员值为空!"

Exit Sub

End If

If 项目 = "" Or IsNull(项目) = True Then

MsgBox "项目值为空!"

Exit Sub

End If

If 收入 = "" Or IsNull(收入) = True Then

MsgBox "收入值为空!"

Exit Sub

End If

If 支出 = "" Or IsNull(支出) = True Then

MsgBox "支出值为空!"

Exit Sub

End If

Dim add_rs As DAO.Recordset

Set add_rs = CurrentDb.OpenRecordset("收支表", dbOpenTable)

With add_rs

.AddNew

!日期.Value = 日期.Value

!类型.Value = 类型.Value

!家庭成员.Value = 家庭成员.Value

!项目.Value = 项目.Value

!内容.Value = 内容.Value

!收入.Value = 收入.Value

!支出.Value = 支出.Value

!备注.Value = 备注.Value

.Update

.Close

End With

Set add_rs = Nothing

MsgBox "添加完成"

Me.数据表子窗体.Form.Requery

End Sub

收支数据表

Private Sub Form_BeforeUpdate(Cancel As Integer)

If 日期.Value <> "" And 类型.Value <> "" And 家庭成员.Value <> "" And 项目.Value <> "" And 内容.Value <> "" And 收入.Value <> "" And 支出.Value <> "" Then

On Error GoTo 数据更新前提醒_Err

If (MsgBox("是否保存对记录的修改", 1, "修改记录提醒") = 1) Then

Beep

Else

DoCmd.RunCommand acCmdUndo

End If

Else

MsgBox "日期,类型,家庭成员,项目,内容,收入,支出都不能为空"

On Error Resume Next

DoCmd.RunCommand acCmdUndo

Exit Sub

End If

数据更新前提醒_Exit:

Exit Sub

数据更新前提醒_Err:

MsgBox Error$

Resume 数据更新前提醒_Exit

End Sub

Private Sub 收支ID_DblClick(Cancel As Integer)

If MsgBox("是否删除该记录:" & Me.收支ID & "?", vbYesNo) = vbYes Then

DoCmd.SetWarnings (False)

Dim del_sql As String

del_sql = "Delete From 收支表 Where 收支ID = " & 收支ID

DoCmd.RunSQL del_sql

Me.Requery

End If

End Sub

收支统计查询

Private Sub Command报表_Click()

If Me.收支项目统计子窗体.Form.FilterOn = True Then

DoCmd.OpenReport "收支项目统计报表", acViewReport, , Me.收支项目统计子窗体.Form.Filter

Else

DoCmd.OpenReport "收支项目统计报表", acViewReport

End If

End Sub

Private Sub Command报表2_Click()

If Me.月收支统计子窗体.Form.FilterOn = True Then

DoCmd.OpenReport "月收支统计报表", acViewReport, , Me.月收支统计子窗体.Form.Filter

Else

DoCmd.OpenReport "月收支统计报表", acViewReport

End If

End Sub

Private Sub Command报表3_Click()

If Me.数据表子窗体.Form.FilterOn = True Then

DoCmd.OpenReport "家庭成员收支统计报表", acViewReport, , Me.数据表子窗体.Form.Filter

Else

DoCmd.OpenReport "家庭成员收支统计报表", acViewReport

End If

End Sub

收支项目数据表

Private Sub Form_BeforeUpdate(Cancel As Integer)

If 项目.Value <> "" And 类型.Value <> "" Then

On Error GoTo 数据更新前提醒_Err

If (MsgBox("是否保存对记录的修改", 1, "修改记录提醒") = 1) Then

Beep

Else

DoCmd.RunCommand acCmdUndo

End If

Else

MsgBox "项目和类型都不能为空"

On Error Resume Next

DoCmd.RunCommand acCmdUndo

Exit Sub

End If

Exit Sub

数据更新前提醒_Err:

MsgBox Error$

End Sub

Private Sub 项目_DblClick(Cancel As Integer)

If MsgBox("是否删除该记录:" & Me.项目 & "?", vbYesNo) = vbYes Then

DoCmd.SetWarnings (False)

Dim del_sql As String

del_sql = "Delete From 收支项目表 Where 项目 = '" & Me.项目 & "'"

DoCmd.RunSQL del_sql

Me.Requery

End If

End Sub

需要系统原文件和全部设计资料可访问同名↓

家庭收支理财管理系统 Access数据库系统课程设计制作实例(家庭收支管理系统java)

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

(0)
上一篇 2023年8月2日 上午9:15
下一篇 2023年8月2日 上午9:25

相关推荐

  • 科研管理工作设想

    科研管理工作设想 随着现代科学技术的飞速发展,科研管理工作也在不断地创新和改进。科研管理工作对于科学研究的开展和研究成果的生成起着至关重要的作用。本文将探讨一些科研管理工作的设想,…

    科研百科 2024年11月19日
    5
  • 企业档案管理流程和方法

    企业档案管理流程和方法 企业档案管理是企业为了收集、整理和管理企业的文件、资料、财务等相关信息而建立的文件系统。合理的档案管理可以提高企业的效率,便于企业信息的查询和使用,有助于企…

    科研百科 2024年8月21日
    44
  • “把支部建在项目部”“把党旗插在工地”厦门水利部门构建基层党建联建工作新格局

    来源:人民网 原创稿 人民网厦门7月26日电 近日,在厦门环东海域滨海旅游浪漫线(下潭尾段)岸线整治及湾区排洪截污工程(以下简称下潭尾岸线整治工程)项目部,厦门市水利局、市水利工程…

    科研百科 2023年11月10日
    130
  • 花一分钟制定服装ERP软件项目进度计划,ERP实施成功不再难(关于服装的erp系统)

    在服装ERP软件项目实施过程中,往往会出现人员不到位、客户环境不满足要求等情况,垦致实施活动不能按时进行,或者不能按时完成,造成实施活动的延迟。一个实施活动的延迟可能会影响一系列后…

    科研百科 2022年7月18日
    230
  • 中药的研究方向有哪些(关于中药学科研项目有哪些)

    中药学科研项目有哪些 随着现代医疗技术的不断发展,中药作为传统的医疗保健方式,越来越受到人们的重视。中药学作为中药研究的一部分,也越来越受到关注。本文将介绍当前中药学领域的科研项目…

    科研百科 2024年4月3日
    464
  • 项目管控进度

    项目管控进度是项目管理中至关重要的一部分,可以帮助我们确保项目按时完成,并在预算内交付。本文将介绍项目管控进度的重要性以及如何有效地进行项目管控进度。 项目管控进度的重要性 项目管…

    科研百科 2024年8月16日
    59
  • 科研项目申请成员分工

    科研项目申请成员分工 科研项目申请是一项非常重要的任务,它涉及到项目的整体规划和管理。在科研项目申请中,成员分工是至关重要的,它关系到项目的质量,进度和成功。因此,在科研项目申请中…

    科研百科 2025年3月6日
    0
  • 建筑工程全过程工程咨询服务的发展(建筑工程全过程工程咨询服务的发展前景)

    随着我国当前社会总体经济的快速发展和人民群众对建筑工程需求的不断增长,建筑行业也得到了快速发展。目前我国建筑市场的竞争日趋激烈,对建筑工程全过程工程咨询服务提出了更高的要求。为适应…

    科研百科 2022年12月19日
    179
  • 甘肃农牧厅科研项目‘’

    甘肃农牧厅科研项目 近年来,甘肃农牧厅一直致力于科研项目的发展,旨在推动当地农业和畜牧业的可持续发展。今天,我们很高兴地宣布,甘肃农牧厅最新的科研项目已经开始实施。 这个科研项目的…

    科研百科 2025年4月10日
    0
  • 妇产科护理科研项目

    妇产科护理科研项目 近年来,随着人口的增长和城市化的加速,妇产科护理科研项目在各级医院得到了广泛的应用和推广。这一项目旨在通过对妇产科患者进行科学研究,提高护理质量,改善患者的治疗…

    科研百科 2025年4月4日
    2