本模块代码如下:
Private Sub Command1_Click() If rs.EOF = False Then Text1.Text = rs(\住址\ Text2.Text = rs(\设备\ Text3.Text = rs(\房屋结构\ Text4.Text = rs(\房屋面积\ Text5.Text = rs(\出售信息\ rs.MoveNext End If End Sub
Private Sub Command2_Click() Dim strql As String
Set db = OpenDatabase(App.Path + \
strsql = \房屋基本信息 (住址,设备,房屋结构,房屋面积,出售信息) values ('\Text1.Text + \& \
db.Execute strsql
31
db.Close Text1.Text = \Text2.Text = \Text3.Text = \Text4.Text = \Text5.Text = \MsgBox \添加成功\End Sub
Private Sub Command3_Click() Dim strsql As String
If MsgBox(\是否要修改此记录\修改\Set db = OpenDatabase(App.Path + \
strsql = \房屋基本信息 set 住址 = '\设备 = '\房屋结构 = '\房屋面积 = '\出售信息='\+ \End If
db.Execute strsql db.Close Text1.Text = \Text2.Text = \Text3.Text = \Text4.Text = \Text5.Text = \MsgBox \修改成功\End Sub
Private Sub Command4_Click() Dim strqsl As String
Set db = OpenDatabase(App.Path + \
strsql = \房屋基本信息 where 住址 = '\db.Execute strsql Text1.Text = \Text2.Text = \Text3.Text = \Text4.Text = \Text5.Text = \MsgBox \删除成功\End Sub
Private Sub Command5_Click() Form5.Show Unload Me End Sub
32
Private Sub Command6_Click() frmMain.Show Unload Me End Sub
Private Sub Form_Load() Dim strsql As String
Set db = OpenDatabase(App.Path + \ strsql = \房屋基本信息\ Set rs = db.OpenRecordset(strsql) End Sub
5.5 物业收费管理模块
物业收费管理用是对小区内物业收费的总管理,主要功能也是对如 (住址、水费、电费、宽带费、物业管理费、收费时间等信息) 的添加、修改、删除、查询及统计记录个数。添加、修改、删除这些操作必须保存后才能生效。记录较多,通过简单的查询可以方便的找的目标记录,查询结果已表格方式显示。表格显示结果的同时,如果还出现多条记录,可以根据某个字段对记录进行排序,这样可以给用户带来更大的方便和提高查找效率。
界面截图如下:
33
本模块代码如下:
Private Sub Command1_Click() If rs.EOF = False Then Text1.Text = rs(\住址\ Text2.Text = rs(\水费\ Text3.Text = rs(\电费\ Text4.Text = rs(\宽带\ Text5.Text = rs(\垃圾清运费\ Text6.Text = rs(\物业管理费\ Text7.Text = rs(\收费时间\ rs.MoveNext End If End Sub
Private Sub Command2_Click() Dim strql As String
Set db = OpenDatabase(App.Path + \
strsql = \收费信息表 (住址,水费,电费,宽带,垃圾清运费,物业管理费,收费时间) values ('\Text1.Text + \
34
& \db.Execute strsql db.Close Text1.Text = \Text2.Text = \Text3.Text = \Text4.Text = \Text5.Text = \Text6.Text = \Text7.Text = \MsgBox \添加成功\End Sub
Private Sub Command3_Click() Dim strsql As String
If MsgBox(\是否要修改此记录\修改\Set db = OpenDatabase(App.Path + \
strsql = \收费信息表 set 住址 = '\水费 = '\电费 = '\+ \宽带 = '\垃圾清运费 ='\物业管理费 = '\收费时间 = '\End If
db.Execute strsql db.Close Text1.Text = \Text2.Text = \Text3.Text = \Text4.Text = \Text5.Text = \Text6.Text = \Text7.Text = \MsgBox \修改成功\End Sub
Private Sub Command4_Click() Dim strqsl As String
Set db = OpenDatabase(App.Path + \
strsql = \收费信息表 where 住址 = '\db.Execute strsql Text1.Text = \Text2.Text = \Text3.Text = \Text4.Text = \Text5.Text = \Text6.Text = \
35