【小區(qū)物業(yè)收費(fèi)管理系統(tǒng)】VB管理系統(tǒng) Access/SQL Server數(shù)據(jù)庫 設(shè)計(jì)制作介紹 代碼分享

設(shè)計(jì)資料






邏輯結(jié)構(gòu)設(shè)計(jì)(關(guān)系模型)
電費(fèi)表(房屋編號(hào),年份,月份,用電量,電費(fèi)單價(jià),已收金額,支付人,收費(fèi)時(shí)間,備注)
物管費(fèi)表(房屋編號(hào),年份,月份,物管費(fèi),已收金額,支付人,收費(fèi)時(shí)間,備注)
燃?xì)赓M(fèi)表(房屋編號(hào),年份,月份,燃?xì)饬?,燃?xì)赓M(fèi)單價(jià),已收金額,支付人,收費(fèi)時(shí)間,備注)
水費(fèi)表(房屋編號(hào),年份,月份,用水量,水費(fèi)單價(jià),已收金額,支付人,收費(fèi)時(shí)間,備注)
暖氣費(fèi)表(房屋編號(hào),年份,月份,暖氣量,暖氣費(fèi)單價(jià),已收金額,支付人,收費(fèi)時(shí)間,備注)
房屋信息表(房屋編號(hào),所在位置,面積,房型,類型,業(yè)主姓名,業(yè)主聯(lián)系方式,居住人姓名,居住人聯(lián)系方式,常住人信息,備注信息)
停車費(fèi)表(房屋編號(hào),年份,月份,車位號(hào),停車費(fèi),已收金額,支付人,收費(fèi)時(shí)間,備注)
系統(tǒng)
登錄窗體

系統(tǒng)主頁

水費(fèi)查詢

水費(fèi)添加

水費(fèi)管理

電費(fèi)查詢

電費(fèi)添加

電費(fèi)管理

費(fèi)用價(jià)格管理

個(gè)人信息

房屋管理

報(bào)表
房屋信息報(bào)表

水費(fèi)報(bào)表

電費(fèi)報(bào)表

示例代碼
水費(fèi)查詢
Option Explicit
Dim dh As Long? '存儲(chǔ)高度差
Dim dw As Long? '存儲(chǔ)寬度差
Private Sub Command查詢1_Click()? ? '單條件查詢
On Error GoTo 結(jié)束查詢
Dim search_field As String
If 查詢字段 = "收費(fèi)時(shí)間" Then
? ? If 起始日期 <> "" And IsNull(起始日期) = False And 截止日期 <> "" And IsNull(截止日期) = False And 查詢字段 <> "" And IsNull(查詢字段) = False Then
? ? ? ? search_field = 查詢字段
? ? ? ? sf_filter = search_field & " between #" & 起始日期 & "# and #" & 截止日期 & "#"
? ? Else
? ? ? ? sf_filter = ""
? ? End If
? ? Adodc1.RecordSource = 生成查詢語句("水費(fèi)查詢", sf_filter, sf_order)
? ? Adodc1.Refresh
? ? DataGrid1.Refresh
? ? DataGrid1.SetFocus
? ? Exit Sub
End If
If 查詢字段 = "水費(fèi)" Or 查詢字段 = "用水量" Then
? ? If 最小 <> "" And IsNull(最小) = False And 最大 <> "" And IsNull(最大) = False And 查詢字段 <> "" And IsNull(查詢字段) = False Then
? ? ? ? search_field = 查詢字段
? ? ? ? sf_filter = search_field & " >= " & 最小 & " And " & search_field & " <= " & 最大
? ? Else
? ? ? ? sf_filter = ""
? ? End If
? ? Adodc1.RecordSource = 生成查詢語句("水費(fèi)查詢", sf_filter, sf_order)
? ? Adodc1.Refresh
? ? DataGrid1.Refresh
? ? DataGrid1.SetFocus
? ? Exit Sub
End If
If 查詢內(nèi)容 <> "" And IsNull(查詢內(nèi)容) = False And 查詢字段 <> "" And IsNull(查詢字段) = False Then
? ? search_field = 查詢字段
? ? sf_filter = search_field & " like '%" & 查詢內(nèi)容 & "%'"
Else
? ? sf_filter = ""
End If
? ? Adodc1.RecordSource = 生成查詢語句("水費(fèi)查詢", sf_filter, sf_order)
? ? Adodc1.Refresh
? ? DataGrid1.Refresh
? ? DataGrid1.SetFocus
? ? Exit Sub
結(jié)束查詢:
? ? MsgBox Err.Description
End Sub
Private Sub Command管理_Click()
sf_num = DataGrid1.Columns(0).Text
frm水費(fèi)管理.Show 1
End Sub
Private Sub Command降序_Click()
If 排序 <> "" And IsNull(排序) = False Then
sf_order = 排序 & " DESC"
Else
sf_order = ""
End If
Adodc1.RecordSource = 生成查詢語句("水費(fèi)查詢", sf_filter, sf_order)
Adodc1.Refresh
DataGrid1.Refresh
DataGrid1.SetFocus
End Sub
Private Sub Command全部_Click()
sf_filter = ""
Adodc1.RecordSource = 生成查詢語句("水費(fèi)查詢", sf_filter, sf_order)
Adodc1.Refresh
DataGrid1.Refresh
DataGrid1.SetFocus
End Sub
Private Sub Command升序_Click()
If 排序 <> "" And IsNull(排序) = False Then
sf_order = 排序 & " ASC"
Else
sf_order = ""
End If
Adodc1.RecordSource = 生成查詢語句("水費(fèi)查詢", sf_filter, sf_order)
Adodc1.Refresh
DataGrid1.Refresh
DataGrid1.SetFocus
End Sub
Private Sub Command生成報(bào)表_Click()
DataReport水費(fèi)報(bào)表.DataMember = ""
With DataEnvironment1
.Commands(2).CommandType = adCmdText
.Commands(2).CommandText = _
?"SHAPE {" & 生成查詢語句("水費(fèi)查詢", sf_filter, sf_order) & "}? AS Command水費(fèi)查詢 COMPUTE Command水費(fèi)查詢, SUM(Command水費(fèi)查詢.'水費(fèi)') AS 水費(fèi)合計(jì) BY '年份','月份'"
.Commands(2).Execute ("SHAPE {" & 生成查詢語句("水費(fèi)查詢", sf_filter, sf_order) & "}? AS Command水費(fèi)查詢 COMPUTE Command水費(fèi)查詢, SUM(Command水費(fèi)查詢.'水費(fèi)') AS 水費(fèi)合計(jì) BY '年份','月份'")
If .rsCommand水費(fèi)查詢_分組.State = 1 Then
? ? .rsCommand水費(fèi)查詢_分組.Close
End If
Set DataReport水費(fèi)報(bào)表.DataSource = DataEnvironment1
DataReport水費(fèi)報(bào)表.DataMember = "Command水費(fèi)查詢_分組"
End With
'打開報(bào)表
DataReport水費(fèi)報(bào)表.Show 1
End Sub
Private Sub Command添加_Click()
If 水費(fèi)添加權(quán)限 = False Then
MsgBox "無權(quán)限"
Exit Sub
End If
frm水費(fèi)添加.Show 1
End Sub
Private Sub Form_Load()
'篩選排序變量清空
sf_filter = ""
sf_order = "水費(fèi)ID DESC"
查詢內(nèi)容.Visible = True
'--隱藏日期控件
起始日期.Visible = False
截止日期.Visible = False
'--隱藏金額控件
最小.Visible = False
最大.Visible = False
'標(biāo)簽
Label查詢內(nèi)容.Visible = True
'--隱藏日期控件
Label起始日期.Visible = False
Label截止日期.Visible = False
'--隱藏金額控件
Label最小.Visible = False
Label最大.Visible = False
'ado控件設(shè)置
Adodc1.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;pwd=123123;Initial Catalog=db_wy;Data Source=(local)"
Adodc1.CommandType = adCmdUnknown
Adodc1.RecordSource = 生成查詢語句("水費(fèi)查詢", sf_filter, sf_order)
Adodc1.Refresh? ? '刷新
'存儲(chǔ)數(shù)據(jù)表格控件與窗體寬高差值
dh = Me.Height - DataGrid1.Height
dw = Me.Width - DataGrid1.Width
End Sub
Function 生成查詢語句(ByVal searchtb As String, ByVal searchfilter As String, ByVal searchorder As String) As String
生成查詢語句 = ""
Dim sqltext As String
sqltext = "Select * From " & searchtb
If searchfilter <> "" Then
sqltext = sqltext & " where " & searchfilter
End If
If searchorder <> "" Then
sqltext = sqltext & " order by " & searchorder
End If
生成查詢語句 = sqltext
End Function
Private Sub Form_Resize()
'窗體大小變化表格控件尺寸改變
If Me.WindowState <> 1 Then
DataGrid1.Height = Me.Height - dh
DataGrid1.Width = Me.Width - dw
End If
End Sub
Private Sub 查詢字段_Click()
If 查詢字段 = "收費(fèi)時(shí)間" Then
起始日期.Visible = True
截止日期.Visible = True
最小.Visible = False
最大.Visible = False
查詢內(nèi)容.Visible = False
起始日期.Value = Date
截止日期.Value = Date
GoTo a1
Else
起始日期.Visible = False
截止日期.Visible = False
最小.Visible = False
最大.Visible = False
查詢內(nèi)容.Visible = True
End If
If 查詢字段 = "水費(fèi)" Or 查詢字段 = "用水量" Then
起始日期.Visible = False
截止日期.Visible = False
最小.Visible = True
最大.Visible = True
查詢內(nèi)容.Visible = False
GoTo a1
Else
起始日期.Visible = False
截止日期.Visible = False
最小.Visible = False
最大.Visible = False
查詢內(nèi)容.Visible = True
End If
a1:
'標(biāo)簽
If 查詢字段 = "收費(fèi)時(shí)間" Then
Label起始日期.Visible = True
Label截止日期.Visible = True
Label最小.Visible = False
Label最大.Visible = False
Label查詢內(nèi)容.Visible = False
GoTo a2
Else
Label起始日期.Visible = False
Label截止日期.Visible = False
Label最小.Visible = False
Label最大.Visible = False
Label查詢內(nèi)容.Visible = True
End If
If 查詢字段 = "水費(fèi)" Or 查詢字段 = "用水量" Then
Label起始日期.Visible = False
Label截止日期.Visible = False
Label最小.Visible = True
Label最大.Visible = True
Label查詢內(nèi)容.Visible = False
GoTo a2
Else
Label起始日期.Visible = False
Label截止日期.Visible = False
Label最小.Visible = False
Label最大.Visible = False
Label查詢內(nèi)容.Visible = True
End If
a2:
End Sub
水費(fèi)添加
Option Explicit
Dim dh As Long? '存儲(chǔ)高度差
Dim dw As Long? '存儲(chǔ)寬度差
Private Sub Command清空_Click()
Text(0).Text = ""
Text(1).Text = ""
Text(2).Text = ""
Text(3).Text = ""
Text(4).Text = ""
Text(5).Text = ""
Text(6).Text = ""
Text(7).Text = ""
Text(8).Text = ""
Combo(1).Text = ""
DTPicker1.Visible = False? ? ? ?'日期控件隱藏
End Sub
Private Sub Command添加_Click()
'On Error GoTo 錯(cuò)誤提示
If 水費(fèi)添加權(quán)限 = False Then
MsgBox "無權(quán)限"
Exit Sub
End If
'判斷必須輸入數(shù)據(jù)的控件不能為空
If Text(0) = "" Or IsNull(Text(0)) = True Then
MsgBox "年份值不能為空!"
Exit Sub
Else
End If
If Text(1) = "" Or IsNull(Text(1)) = True Then
MsgBox "用水量值不能為空!"
Exit Sub
Else
End If
If Text(3) = "" Or IsNull(Text(3)) = True Then
MsgBox "已收金額值不能為空!"
Exit Sub
Else
End If
If Text(7) = "" Or IsNull(Text(7)) = True Then
MsgBox "房屋編號(hào)不能為空!"
Exit Sub
Else
End If
If Text(8) = "" Or IsNull(Text(8)) = True Then
MsgBox "水費(fèi)單價(jià)值不能為空!"
Exit Sub
Else
End If
If Combo(1) = "" Or IsNull(Combo(1)) = True Then
MsgBox "月份值不能為空!"
Exit Sub
Else
End If
If Text(5) = "" Or IsNull(Text(5)) = True Then
MsgBox "收費(fèi)日期不能為空!"
Exit Sub
Else
End If
'檢查房屋編號(hào)是否已存在
? ? If dcountlink("房屋編號(hào)", "房屋信息表", "房屋編號(hào)='" & Text(7) & "'", 0) = 0 Then
? ? MsgBox "該房屋編號(hào)不存在,請(qǐng)修改后重試"
? ? Exit Sub
? ? End If
Dim add_conn As New ADODB.Connection
Dim add_rs As New ADODB.Recordset
With add_conn
? ? .ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;pwd=123123;Initial Catalog=db_wy;Data Source=(local)"
? ? .Open
End With
? ? ? ?add_rs.Open "水費(fèi)表", add_conn, adOpenKeyset, adLockOptimistic
? ? ? ?add_rs.AddNew
'? ? ? ?On Error Resume Next
? ? ? ? ? ? add_rs!年份.Value = Text(0).Text
? ? ? ? ? ? add_rs!用水量.Value = Text(1).Text
? ? ? ? ? ? add_rs!已收金額.Value = Text(3).Text
? ? ? ? ? ? add_rs!支付人.Value = Text(4).Text
? ? ? ? ? ? add_rs!收費(fèi)時(shí)間.Value = Text(5).Text
? ? ? ? ? ? add_rs!備注.Value = Text(6).Text
? ? ? ? ? ? add_rs!房屋編號(hào).Value = Text(7).Text
? ? ? ? ? ? add_rs!水費(fèi)單價(jià).Value = Text(8).Text
? ? ? ? ? ? add_rs!月份.Value = Combo(1).Text
? ? ? ?add_rs.Update
? ? ? ?add_rs.Clone
? ? ? ?Set add_rs = Nothing
? ? ? ?add_conn.Close
? ? ? ?Set add_conn = Nothing
? ? ? ?MsgBox "添加完成"
? ? ? ?Call Command清空_Click
? ? ? ?Adodc1.Refresh
? ? ? ?DataGrid1.Refresh
Exit Sub
錯(cuò)誤提示:
MsgBox Err.Description
End Sub
Private Sub DataGrid2_Click()
Text(8).Text = DataGrid2.Columns(0).Text
DataGrid2.Visible = False
End Sub
Private Sub DataGrid2_LostFocus()
DataGrid2.Visible = False
End Sub
Private Sub Form_Load()
'ado控件設(shè)置
Me.Adodc1.CommandType = adCmdUnknown
Me.Adodc1.RecordSource = "select * From 水費(fèi)查詢 Order By 水費(fèi)ID DESC"
Me.Adodc1.Refresh? ? '刷新
'
'存儲(chǔ)數(shù)據(jù)表格控件與窗體寬高差值
dh = Me.Height - DataGrid1.Height
dw = Me.Width - DataGrid1.Width
Me.Adodc2.Refresh
End Sub
Private Sub Form_Resize()
'窗體大小變化表格控件尺寸改變
If Me.WindowState <> 1 Then
DataGrid1.Height = Me.Height - dh
DataGrid1.Width = Me.Width - dw
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
'On Error Resume Next
frm水費(fèi)查詢.Adodc1.Refresh
frm水費(fèi)查詢.DataGrid1.Refresh
End Sub
Private Sub DTPicker1_LostFocus()
DTPicker1.Format = dtpCustom? ? '日期格式設(shè)置
Text(5).Text = DTPicker1.Value? '返回選擇的日期值至文本框
DTPicker1.Visible = False? ? ? ?'日期控件隱藏
End Sub
Private Sub Text_DblClick(Index As Integer)
If Index = 0 Then? ? ? ?'返回年份
? ?Text(0).Text = Year(Date)
End If
If Index = 8 And DataGrid2.Visible = False Then? ? ? ?'顯示出選擇單價(jià)列表
? ?DataGrid2.Visible = True
Else
? ?DataGrid2.Visible = False
End If
If Index = 5 Then? ? ? ?'雙擊輸入日期的文本框
? ?If Text(5) <> "" Then
? ?Else
? ?Text(5) = Date
? ?DTPicker1.Value = Date
? ?End If
? ?DTPicker1.Visible = True? ? ?'顯示日期選擇控件
End If
If Index = 7 Then
fw_formname = "frm水費(fèi)添加"
frm房屋選擇.Show 1
End If
End Sub
Private Sub Text_LostFocus(Index As Integer)
'計(jì)算水費(fèi)
If Text(8).Text <> "" And Text(1).Text <> "" Then
? ? Text(2).Text = CCur(Text(8).Text * Text(1).Text)
End If
If Index = 5 Then? ? ? ?'輸入日期的文本框失去焦點(diǎn)
? ?If Text(5).Text <> "" And IsDate(Text(5)) = False Then
? ? ? MsgBox "輸入的數(shù)據(jù)不是日期類型,請(qǐng)重新輸入"
? ? ? Text(5).Text = ""
? ? ? DTPicker1.Value = False
? ? ? Exit Sub
? ?End If
End If
If Index = 3 Then? ? ? ?'輸入貨幣格式的文本框失去焦點(diǎn)
? ?If Text(3).Text <> "" And IsNumeric(Text(3)) = False Then
? ? ? MsgBox "輸入的數(shù)據(jù)不是貨幣類型,請(qǐng)重新輸入"
? ? ? Text(3).Text = ""
? ? ? Exit Sub
? ?End If
End If
If Index = 8 Then? ? ? ?'輸入貨幣格式的文本框失去焦點(diǎn)
? ?If Text(8).Text <> "" And IsNumeric(Text(8)) = False Then
? ? ? MsgBox "輸入的數(shù)據(jù)不是貨幣類型,請(qǐng)重新輸入"
? ? ? Text(8).Text = ""
? ? ? Exit Sub
? ?End If
End If
If Index = 1 Then? ? ? ?'輸入貨幣格式的文本框失去焦點(diǎn)
? ?If Text(1).Text <> "" And IsNumeric(Text(1)) = False Then
? ? ? MsgBox "輸入的數(shù)據(jù)不是數(shù)值類型,請(qǐng)重新輸入"
? ? ? Text(1).Text = ""
? ? ? Exit Sub
? ?End If
End If
End Sub
水費(fèi)管理
Option Explicit
Private Sub Command更新_Click()
On Error GoTo 更新失敗錯(cuò)誤
If 水費(fèi)更新權(quán)限 = False Then
MsgBox "無權(quán)限"
Exit Sub
End If
If MsgBox("是否更新該水費(fèi)記錄?", vbOKCancel) <> vbOK Then
Exit Sub
End If
'判斷必須輸入數(shù)據(jù)的控件不能為空
If Text(0) = "" Or IsNull(Text(0)) = True Then
MsgBox "年份值不能為空!"
Exit Sub
Else
End If
If Text(1) = "" Or IsNull(Text(1)) = True Then
MsgBox "用水量值不能為空!"
Exit Sub
Else
End If
If Text(3) = "" Or IsNull(Text(3)) = True Then
MsgBox "已收金額值不能為空!"
Exit Sub
Else
End If
If Text(7) = "" Or IsNull(Text(7)) = True Then
MsgBox "房屋編號(hào)不能為空!"
Exit Sub
Else
End If
If Text(8) = "" Or IsNull(Text(8)) = True Then
MsgBox "水費(fèi)單價(jià)值不能為空!"
Exit Sub
Else
End If
If Combo(1) = "" Or IsNull(Combo(1)) = True Then
MsgBox "月份值不能為空!"
Exit Sub
Else
End If
If Text(5) = "" Or IsNull(Text(5)) = True Then
MsgBox "收費(fèi)日期不能為空!"
Exit Sub
Else
End If
'如果修改了房屋編號(hào),需要檢查
? ? If dcountlink("房屋編號(hào)", "房屋信息表", "房屋編號(hào)='" & Text(7) & "'", 0) = 0 Then
? ? MsgBox "該房屋編號(hào)不存在,請(qǐng)修改后重試"
? ? Exit Sub
? ? End If
'連接數(shù)據(jù)庫并更新
Adodc1.Recordset.Update
MsgBox "更新完成!"
Exit Sub
更新失敗錯(cuò)誤:
MsgBox Err.Description
End Sub
Private Sub Command刪除_Click()
On Error GoTo 刪除失敗錯(cuò)誤
If 水費(fèi)刪除權(quán)限 = False Then
MsgBox "無權(quán)限"
Exit Sub
End If
If MsgBox("是否刪除該水費(fèi)記錄?", vbOKCancel) <> vbOK Then
Exit Sub
End If
Adodc1.Recordset.Delete
MsgBox "刪除完成"
Unload Me
Exit Sub
刪除失敗錯(cuò)誤:
MsgBox Err.Description
End Sub
Private Sub DataGrid2_Click()
Text(8).Text = DataGrid2.Columns(0).Text
DataGrid2.Visible = False
End Sub
Private Sub DataGrid2_LostFocus()
DataGrid2.Visible = False
End Sub
Private Sub Form_Load()
'ado控件設(shè)置
Me.Adodc1.Refresh? ? '刷新
Me.Adodc1.CommandType = adCmdUnknown
Me.Adodc1.RecordSource = "select * From 水費(fèi)表 where 水費(fèi)ID=" & sf_num
Me.Adodc1.Refresh? ? '刷新
'
Me.Adodc2.Refresh
If Text(8).Text <> "" And Text(1).Text <> "" Then
? ? Text(2).Text = CCur(Text(8).Text * Text(1).Text)
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
'On Error Resume Next
frm水費(fèi)查詢.Adodc1.Refresh
frm水費(fèi)查詢.DataGrid1.Refresh
End Sub
Private Sub DTPicker1_LostFocus()
DTPicker1.Format = dtpCustom? ? '日期格式設(shè)置
Text(5).Text = DTPicker1.Value? '返回選擇的日期值至文本框
DTPicker1.Visible = False? ? ? ?'日期控件隱藏
End Sub
Private Sub Text_DblClick(Index As Integer)
If Index = 0 Then? ? ? ?'返回年份
? ?Text(0).Text = Year(Date)
End If
If Index = 8 And DataGrid2.Visible = False Then? ? ? ?'顯示出選擇單價(jià)列表
? ?DataGrid2.Visible = True
Else
? ?DataGrid2.Visible = False
End If
If Index = 5 Then? ? ? ?'雙擊輸入日期的文本框
? ?If Text(5) <> "" Then
? ?Else
? ?Text(5) = Date
? ?DTPicker1.Value = Date
? ?End If
? ?DTPicker1.Visible = True? ? ?'顯示日期選擇控件
End If
If Index = 7 Then
fw_formname = "frm水費(fèi)管理"
frm房屋選擇.Show 1
End If
End Sub
Private Sub Text_LostFocus(Index As Integer)
'計(jì)算水費(fèi)
If Text(8).Text <> "" And Text(1).Text <> "" Then
? ? Text(2).Text = CCur(Text(8).Text * Text(1).Text)
End If
If Index = 5 Then? ? ? ?'輸入日期的文本框失去焦點(diǎn)
? ?If Text(5).Text <> "" And IsDate(Text(5)) = False Then
? ? ? MsgBox "輸入的數(shù)據(jù)不是日期類型,請(qǐng)重新輸入"
? ? ? Text(5).Text = ""
? ? ? DTPicker1.Value = False
? ? ? Exit Sub
? ?End If
End If
If Index = 3 Then? ? ? ?'輸入貨幣格式的文本框失去焦點(diǎn)
? ?If Text(3).Text <> "" And IsNumeric(Text(3)) = False Then
? ? ? MsgBox "輸入的數(shù)據(jù)不是貨幣類型,請(qǐng)重新輸入"
? ? ? Text(3).Text = ""
? ? ? Exit Sub
? ?End If
End If
If Index = 8 Then? ? ? ?'輸入貨幣格式的文本框失去焦點(diǎn)
? ?If Text(8).Text <> "" And IsNumeric(Text(8)) = False Then
? ? ? MsgBox "輸入的數(shù)據(jù)不是貨幣類型,請(qǐng)重新輸入"
? ? ? Text(8).Text = ""
? ? ? Exit Sub
? ?End If
End If
If Index = 1 Then? ? ? ?'輸入貨幣格式的文本框失去焦點(diǎn)
? ?If Text(1).Text <> "" And IsNumeric(Text(1)) = False Then
? ? ? MsgBox "輸入的數(shù)據(jù)不是數(shù)值類型,請(qǐng)重新輸入"
? ? ? Text(1).Text = ""
? ? ? Exit Sub
? ?End If
End If
End Sub
數(shù)據(jù)庫
access數(shù)據(jù)庫
小區(qū)物業(yè)收費(fèi)管理系統(tǒng)后端采用access數(shù)據(jù)庫存儲(chǔ)數(shù)據(jù),格式為mdb,命名為db_data,為了保證安全性,數(shù)據(jù)庫設(shè)置加密,密碼為abc123。
?
表
費(fèi)用價(jià)格表

電費(fèi)表

物管費(fèi)表

燃?xì)赓M(fèi)表

水費(fèi)表

暖氣費(fèi)表

房屋信息表

停車費(fèi)表

房屋房型表

房屋類型表

?
表關(guān)系

?
查詢
車位查詢


SELECT 停車費(fèi)表.車位號(hào), 停車費(fèi)表.房屋編號(hào)
FROM 停車費(fèi)表;
?
電費(fèi)查詢


SELECT 電費(fèi)表.電費(fèi)ID, 電費(fèi)表.年份, 電費(fèi)表.月份, 電費(fèi)表.房屋編號(hào), 房屋信息表.所在位置, 房屋信息表.業(yè)主姓名, 電費(fèi)表.用電量, 電費(fèi)表.電費(fèi)單價(jià), [電費(fèi)單價(jià)]*[用電量] AS 電費(fèi), 電費(fèi)表.已收金額, [電費(fèi)單價(jià)]*[用電量]-[已收金額] AS 未付金額, 電費(fèi)表.支付人, 電費(fèi)表.收費(fèi)時(shí)間, 電費(fèi)表.備注
FROM 房屋信息表 INNER JOIN 電費(fèi)表 ON 房屋信息表.房屋編號(hào) = 電費(fèi)表.房屋編號(hào);
?
房屋編號(hào)查詢


SELECT 房屋信息表.房屋編號(hào), 房屋信息表.所在位置, 房屋信息表.業(yè)主姓名, 房屋信息表.類型
FROM 房屋信息表;
?
房屋電費(fèi)查詢


SELECT 電費(fèi)表.房屋編號(hào) AS 表達(dá)式1, 電費(fèi)表.年份 AS 表達(dá)式2, 電費(fèi)表.月份 AS 表達(dá)式3, [用電量]*[電費(fèi)單價(jià)] AS 電費(fèi)
FROM 電費(fèi)表;
?
房屋暖氣費(fèi)查詢


SELECT 暖氣費(fèi)表.房屋編號(hào), 暖氣費(fèi)表.年份, 暖氣費(fèi)表.月份, [暖氣量]*[暖氣費(fèi)單價(jià)] AS 暖氣費(fèi)
FROM 暖氣費(fèi)表;
?
房屋燃?xì)赓M(fèi)查詢


SELECT 燃?xì)赓M(fèi)表.房屋編號(hào), 燃?xì)赓M(fèi)表.年份, 燃?xì)赓M(fèi)表.月份, [燃?xì)饬縘*[燃?xì)赓M(fèi)單價(jià)] AS 燃?xì)赓M(fèi)
FROM 燃?xì)赓M(fèi)表;
?
房屋水費(fèi)查詢


SELECT 水費(fèi)表.房屋編號(hào), 水費(fèi)表.年份, 水費(fèi)表.月份, [水費(fèi)單價(jià)]*[用水量] AS 水費(fèi)
FROM 水費(fèi)表;
?
房屋停車費(fèi)查詢


SELECT 停車費(fèi)表.房屋編號(hào), 停車費(fèi)表.年份, 停車費(fèi)表.月份, 停車費(fèi)表.車位號(hào), 停車費(fèi)表.停車費(fèi)
FROM 停車費(fèi)表;
?
房屋物管費(fèi)查詢


SELECT 物管費(fèi)表.房屋編號(hào), 物管費(fèi)表.年份, 物管費(fèi)表.月份, 物管費(fèi)表.物管費(fèi)
FROM 物管費(fèi)表;
?
暖氣費(fèi)查詢


SELECT 暖氣費(fèi)表.暖氣費(fèi)ID, 暖氣費(fèi)表.年份, 暖氣費(fèi)表.月份, 暖氣費(fèi)表.房屋編號(hào), 房屋信息表.所在位置, 房屋信息表.業(yè)主姓名, 暖氣費(fèi)表.暖氣量, 暖氣費(fèi)表.暖氣費(fèi)單價(jià), [暖氣量]*[暖氣費(fèi)單價(jià)] AS 暖氣費(fèi), 暖氣費(fèi)表.已收金額, [暖氣量]*[暖氣費(fèi)單價(jià)]-[已收金額] AS 未收金額, 暖氣費(fèi)表.支付人, 暖氣費(fèi)表.收費(fèi)時(shí)間, 暖氣費(fèi)表.備注
FROM 房屋信息表 INNER JOIN 暖氣費(fèi)表 ON 房屋信息表.房屋編號(hào) = 暖氣費(fèi)表.房屋編號(hào);
?
燃?xì)赓M(fèi)查詢


SELECT 燃?xì)赓M(fèi)表.燃?xì)赓M(fèi)ID, 燃?xì)赓M(fèi)表.年份, 燃?xì)赓M(fèi)表.月份, 燃?xì)赓M(fèi)表.房屋編號(hào), 房屋信息表.所在位置, 房屋信息表.業(yè)主姓名, 燃?xì)赓M(fèi)表.燃?xì)饬? 燃?xì)赓M(fèi)表.燃?xì)赓M(fèi)單價(jià), [燃?xì)饬縘*[燃?xì)赓M(fèi)單價(jià)] AS 燃?xì)赓M(fèi), 燃?xì)赓M(fèi)表.已收金額, [燃?xì)饬縘*[燃?xì)赓M(fèi)單價(jià)]-[已收金額] AS 未付金額, 燃?xì)赓M(fèi)表.支付人, 燃?xì)赓M(fèi)表.收費(fèi)時(shí)間, 燃?xì)赓M(fèi)表.備注
FROM 房屋信息表 INNER JOIN 燃?xì)赓M(fèi)表 ON 房屋信息表.房屋編號(hào) = 燃?xì)赓M(fèi)表.房屋編號(hào);
?
水費(fèi)查詢


SELECT 水費(fèi)表.水費(fèi)ID, 水費(fèi)表.年份, 水費(fèi)表.月份, 水費(fèi)表.房屋編號(hào), 房屋信息表.所在位置, 房屋信息表.業(yè)主姓名, 水費(fèi)表.用水量, 水費(fèi)表.水費(fèi)單價(jià), [用水量]*[水費(fèi)單價(jià)] AS 水費(fèi), 水費(fèi)表.已收金額, [用水量]*[水費(fèi)單價(jià)]-[已收金額] AS 未付金額, 水費(fèi)表.支付人, 水費(fèi)表.收費(fèi)時(shí)間, 水費(fèi)表.備注
FROM 房屋信息表 INNER JOIN 水費(fèi)表 ON 房屋信息表.房屋編號(hào) = 水費(fèi)表.房屋編號(hào);
?
停車費(fèi)查詢


SELECT 停車費(fèi)表.停車費(fèi)ID, 停車費(fèi)表.年份, 停車費(fèi)表.月份, 停車費(fèi)表.房屋編號(hào), 房屋信息表.所在位置, 房屋信息表.業(yè)主姓名, 停車費(fèi)表.車位號(hào), 停車費(fèi)表.停車費(fèi), 停車費(fèi)表.已收金額, [停車費(fèi)]-[已收金額] AS 未付金額, 停車費(fèi)表.支付人, 停車費(fèi)表.收費(fèi)時(shí)間, 停車費(fèi)表.備注
FROM 房屋信息表 INNER JOIN 停車費(fèi)表 ON 房屋信息表.房屋編號(hào) = 停車費(fèi)表.房屋編號(hào);
?
物管費(fèi)查詢


SELECT 物管費(fèi)表.物管費(fèi)ID, 物管費(fèi)表.年份, 物管費(fèi)表.月份, 物管費(fèi)表.房屋編號(hào), 房屋信息表.所在位置, 房屋信息表.業(yè)主姓名, 物管費(fèi)表.物管費(fèi), 物管費(fèi)表.已收金額, [物管費(fèi)]-[已收金額] AS 未付金額, 物管費(fèi)表.支付人, 物管費(fèi)表.收費(fèi)時(shí)間, 物管費(fèi)表.備注
FROM 房屋信息表 INNER JOIN 物管費(fèi)表 ON 房屋信息表.房屋編號(hào) = 物管費(fèi)表.房屋編號(hào);
SQL SERVER數(shù)據(jù)庫
小區(qū)物業(yè)收費(fèi)管理系統(tǒng)后端采用sql server數(shù)據(jù)庫存儲(chǔ)數(shù)據(jù),命名為db_wy,為了保證安全性,數(shù)據(jù)庫服務(wù)器登錄名為sa,密碼為12323。
?
【表】
費(fèi)用價(jià)格表

電費(fèi)表

物管費(fèi)表

燃?xì)赓M(fèi)表

水費(fèi)表

暖氣費(fèi)表

房屋信息表

停車費(fèi)表

房屋房型表

房屋類型表

?
表關(guān)系

?
【視圖】
電費(fèi)查詢

?
房屋編號(hào)查詢

房屋電費(fèi)查詢

房屋暖氣費(fèi)查詢

房屋燃?xì)赓M(fèi)查詢

房屋水費(fèi)查詢

房屋停車費(fèi)查詢

房屋物管費(fèi)查詢

?
暖氣費(fèi)查詢

燃?xì)赓M(fèi)查詢

水費(fèi)查詢

停車費(fèi)查詢

物管費(fèi)查詢

需要以上設(shè)計(jì)資料,系統(tǒng)原文件和代碼可在頻道主頁聯(lián)系我
?
?