📄 frmaver.frm
字号:
VERSION 5.00
Begin VB.Form frmaver
BorderStyle = 3 'Fixed Dialog
Caption = "人均住房面积:"
ClientHeight = 2295
ClientLeft = 45
ClientTop = 330
ClientWidth = 4200
Icon = "frmaver.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2295
ScaleWidth = 4200
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton Command1
Caption = "确定(&O)"
Height = 375
Left = 1440
TabIndex = 9
Top = 1800
Width = 1215
End
Begin VB.TextBox Text3
BackColor = &H8000000B&
BorderStyle = 0 'None
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Left = 2160
Locked = -1 'True
TabIndex = 5
Top = 1300
Width = 975
End
Begin VB.TextBox Text2
BackColor = &H8000000B&
BorderStyle = 0 'None
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Left = 2280
Locked = -1 'True
TabIndex = 4
Top = 825
Width = 975
End
Begin VB.TextBox Text1
BackColor = &H8000000B&
BorderStyle = 0 'None
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Left = 2160
Locked = -1 'True
TabIndex = 3
Top = 360
Width = 975
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "平方米/人"
Height = 180
Left = 3240
TabIndex = 8
Top = 1320
Width = 810
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "人"
Height = 180
Left = 3435
TabIndex = 7
Top = 840
Width = 180
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "平方米"
Height = 180
Left = 3315
TabIndex = 6
Top = 360
Width = 540
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "人均住房面积:"
Height = 180
Left = 480
TabIndex = 2
Top = 1320
Width = 1260
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "总人数(含家庭人口):"
Height = 180
Left = 240
TabIndex = 1
Top = 840
Width = 1980
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "教师住房总面积:"
Height = 180
Left = 480
TabIndex = 0
Top = 360
Width = 1440
End
End
Attribute VB_Name = "frmaver"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''' 教师住房管理系统 Version 1.0 '''
''' (VB6.0 源代码) '''
''' '''
''' 俊彦软件工作室出品 '''
''' '''
''' (浦口校区科技节“电子杯”程序设计大赛参赛作品) '''
''' '''
''' 程序设计:东南大学土木工程学院 周曹俊 '''
''' '''
''' CopyRight AllRights Reserved (c)2003 '''
''' '''
''' 2003年5月15日 '''
''' '''
''' '''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim rs1 As Recordset, rs22 As Recordset, rs3 As Recordset
Set rs22 = db.OpenRecordset("host")
Set rs1 = db.OpenRecordset("select sum(livearea) as nsum from host")
Set rs3 = db.OpenRecordset("member")
If Not rs1.EOF Then
Text1.Text = CStr(rs1!nsum) '总住房面积数
End If
Text2.Text = CStr(rs22.RecordCount + rs3.RecordCount) '总人数
If Text2.Text <> "" Then
Text3.Text = Format(rs1!nsum / (rs22.RecordCount + rs3.RecordCount), "0.00") '平均住房面积
End If
Command1.Default = True
Set rs1 = Nothing
Set rs22 = Nothing
Set rs3 = Nothing
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -