📄 frm_yzinfo.frm
字号:
Height = 180
Left = 6015
TabIndex = 36
Top = 2025
Width = 1260
End
Begin VB.Label Label17
AutoSize = -1 'True
Caption = "进住日期:"
Height = 180
Left = 3750
TabIndex = 29
Top = 2370
Width = 900
End
Begin VB.Label Label16
AutoSize = -1 'True
Caption = "签约时间:"
Height = 180
Left = 3735
TabIndex = 28
Top = 1995
Width = 900
End
Begin VB.Label Label15
AutoSize = -1 'True
Caption = "工作单位:"
Height = 180
Left = 3705
TabIndex = 27
Top = 1560
Width = 900
End
Begin VB.Label Label14
AutoSize = -1 'True
Caption = "证件号码:"
Height = 180
Left = 3735
TabIndex = 26
Top = 1155
Width = 900
End
Begin VB.Label Label13
AutoSize = -1 'True
Caption = "是否进入:"
Height = 180
Left = 3735
TabIndex = 25
Top = 735
Width = 900
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "证件名称:"
Height = 180
Left = 3720
TabIndex = 24
Top = 345
Width = 900
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "性别:"
Height = 180
Left = 2175
TabIndex = 22
Top = 765
Width = 540
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "单位电话:"
Height = 180
Left = 165
TabIndex = 15
Top = 2385
Width = 900
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "联系地址:"
Height = 180
Left = 195
TabIndex = 14
Top = 1965
Width = 900
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "电 话:"
Height = 180
Left = 195
TabIndex = 13
Top = 1575
Width = 720
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "手 机:"
Height = 180
Left = 210
TabIndex = 12
Top = 1140
Width = 720
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "业主姓名:"
Height = 180
Left = 195
TabIndex = 11
Top = 765
Width = 900
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "业主代号:"
Height = 180
Left = 195
TabIndex = 10
Top = 375
Width = 900
End
End
Begin VB.Frame Frame1
Caption = "房间位置信息"
Height = 735
Left = 195
TabIndex = 0
Top = 285
Width = 8700
Begin VB.TextBox Text4
Enabled = 0 'False
Height = 300
Left = 7500
TabIndex = 8
Top = 255
Width = 1000
End
Begin VB.TextBox Text3
Enabled = 0 'False
Height = 300
Left = 5385
TabIndex = 3
Top = 270
Width = 1000
End
Begin VB.TextBox Text2
Enabled = 0 'False
Height = 300
Left = 3270
TabIndex = 2
Top = 285
Width = 1000
End
Begin VB.TextBox Text1
Enabled = 0 'False
Height = 300
Left = 1320
TabIndex = 1
Top = 285
Width = 1000
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "房间编号:"
Height = 180
Left = 6615
TabIndex = 7
Top = 315
Width = 900
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "房间号码:"
Height = 180
Left = 4410
TabIndex = 6
Top = 315
Width = 915
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "大楼名称:"
Height = 180
Left = 2325
TabIndex = 5
Top = 360
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "小区名称:"
Height = 180
Left = 150
TabIndex = 4
Top = 360
Width = 900
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 345
Left = 450
Top = 465
Width = 2265
_ExtentX = 3995
_ExtentY = 609
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\工程与实践\物业管理系统\program\db_wygl.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\工程与实践\物业管理系统\program\db_wygl.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from tab_yzinfo"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.TextBox Text15
Height = 270
Left = 750
TabIndex = 52
Text = "Text15"
Top = 405
Width = 795
End
Begin VB.Label Label22
Caption = "Label22"
DataField = "人口编号"
DataSource = "Adodc2"
Height = 270
Left = 1710
TabIndex = 53
Top = 7170
Width = 1830
End
End
Attribute VB_Name = "Frm_yzinfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim KeyCode As String
Private Sub CmdSaveYZ_Click()
If Text6.Text = "" Or Text7.Text = "" Or Text8.Text = "" Or Text9.Text = "" Or Text10.Text = "" Or Text11.Text = "" Or Text12.Text = "" Or Text13.Text = "" Or Text14.Text = "" Or Combo1 = "" Or Combo2 = "" Or Combo3 = "" Or DTPicker1 = "" Or DTPicker2 = "" Or DTPicker3 = "" Or DTPicker4 = "" Then
MsgBox "不允许为空", 48, "提示"
Exit Sub
End If
If Not IsNumeric(Trim(Text7.Text)) Or Not IsNumeric(Trim(Text8.Text)) Or Not IsNumeric(Trim(Text10.Text)) Or Not IsNumeric(Trim(Text11.Text)) Or Not IsNumeric(Trim(Text13.Text)) Or Not IsNumeric(Trim(Text14.Text)) Then
MsgBox "应添数字类型", 48, "提示"
Exit Sub
End If
If Len(Text7.Text) <> 11 Then
MsgBox "输入的手机号位不对,请重新输入", 48, "提示"
Exit Sub
End If
Set adors = cn.Execute("insert into tab_yzinfo values('" & Text5 & "','" & Text6 & "','" & Combo1 & "','" & Text9 & "','" & Text7 & "','" & Text8 & "','" & Text12 & "','" & Text10 & "','" & Combo2 & "','" & Text11 & "','" & DTPicker1 & "','" & DTPicker2 & "','" & DTPicker3 & "','" & DTPicker4 & "','" & Combo3 & "','" & Text13 & "','" & Text14 & "','" & Text4 & "','" & Text1 & "','" & Text2 & "','" & Text3 & "') ")
Frm_yzinfodj.Adodc3.Recordset.Update ("户主姓名"), Text6.Text
Adodc1.Refresh
Set adors = cn.Execute("insert into tab_rkinfo (人口编号,姓名,性别,与户主关系,工作单位,单位电话,手机,传呼,小区名称,大楼名称,房间号,身份证号,房间编号) values('" & Text15 & "','" & Text6 & "','" & Combo1 & "','" & "户主" & "','" & Text12 & "','" & Text10 & "','" & Text7 & "','" & Text8 & "','" & Text1 & "','" & Text2 & "','" & Text3 & "','" & Text11 & "','" & Text4 & "') ")
MsgBox "数据保存成功", 32, "管理信息系统"
End Sub
Private Sub CmdNewCY_Click()
Frm_jtcyinfo.Show
End Sub
Private Sub CmdEditCY_Click()
Frm_jtcyinfo.Adodc1.RecordSource = "select * from tab_rkinfo where 人口编号 = '" + Label22.Caption + "' "
Frm_jtcyinfo.Adodc1.Refresh
Frm_jtcyinfo.Show
End Sub
Private Sub CmdDeleteCY_Click()
If Adodc2.Recordset.RecordCount > 0 Then
Adodc2.Recordset.Delete
Adodc2.Recordset.Update
End If
End Sub
Private Sub Command5_Click()
Unload Me
Frm_yzinfodj.Show
End Sub
Private Sub Form_Load()
Adodc2.RecordSource = "select * from tab_rkinfo order by 人口编号"
Adodc2.Refresh
If Adodc2.Recordset.RecordCount > 0 Then
If Adodc2.Recordset.EOF = False Then
Adodc2.Recordset.MoveLast
Text15.Text = "rk" + Trim(Mid(Adodc2.Recordset.Fields("人口编号"), 3, 2) + 1)
Else
Text15.Text = "rk" + Trim(Mid(Adodc2.Recordset.Fields("人口编号"), 3, 2) + 1)
End If
Else
Text15.Text = "rk" + "1"
End If
End Sub
Private Sub Text10_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text11.SetFocus
End If
End Sub
Private Sub Text11_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text12.SetFocus
End If
End Sub
Private Sub Text12_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text13.SetFocus
End If
End Sub
Private Sub Text13_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text14.SetFocus
End If
End Sub
Private Sub Text6_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text7.SetFocus
End If
End Sub
Private Sub Text7_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text8.SetFocus
End If
End Sub
Private Sub Text8_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text9.SetFocus
End If
End Sub
Private Sub Text9_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text10.SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -