📄 residentresign.frm
字号:
EndProperty
BeginProperty ColumnHeader(9) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 8
Text = "家庭成员姓名1"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(10) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 9
Text = "家庭成员姓名2"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(11) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 10
Text = "家庭成员姓名3"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(12) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 11
Text = "家庭成员姓名4"
Object.Width = 2540
EndProperty
End
Begin VB.Label Label12
Caption = "联系电话:"
Height = 255
Left = 6060
TabIndex = 30
Top = 1755
Width = 1065
End
Begin VB.Label Label11
Caption = "登记时间:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 600
TabIndex = 29
Top = 2205
Width = 1065
End
Begin VB.Label Label10
Caption = "家庭成员姓名4:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5550
TabIndex = 24
Top = 3075
Width = 1575
End
Begin VB.Label Label6
Caption = "家庭成员姓名3:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 90
TabIndex = 23
Top = 3075
Width = 1575
End
Begin VB.Label Label5
Caption = "家庭成员姓名2:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5550
TabIndex = 22
Top = 2655
Width = 1575
End
Begin VB.Label Label9
Caption = "门牌号码:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 600
TabIndex = 21
Top = 1755
Width = 1065
End
Begin VB.Label Label8
Caption = "入住时间:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 6060
TabIndex = 20
Top = 2205
Width = 1065
End
Begin VB.Label Label7
Caption = "家庭成员姓名1:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 19
Top = 2655
Width = 1575
End
Begin VB.Label Label4
Caption = "物业主性别:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 390
TabIndex = 18
Top = 1380
Width = 1275
End
Begin VB.Label Label3
Caption = "物业主身份证证号:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5220
TabIndex = 17
Top = 975
Width = 1905
End
Begin VB.Label Label2
Caption = "物业主姓名:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 390
TabIndex = 16
Top = 975
Width = 1275
End
End
End
Attribute VB_Name = "residentResign"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_Ext_KEY = "RVB_UniqueId" ,"42B9FF020095"
Attribute VB_Ext_KEY = "RVB_ModelStereotype" ,"Form"
Option Explicit
Private Sub Command1_Click()
Dim mItem As Variant
Dim user_sex As String
user_sex = "男"
If Trim(Me.txtInRecNo.Text) = "" Then
MsgBox "入住登记表号不能为空,请输入!", vbOKOnly + vbInformation, "提示信息"
Me.txtInRecNo.SetFocus
End If
If Trim(Me.txtName.Text) = "" Then
MsgBox "业主姓名不能为空,请输入!", vbOKOnly + vbInformation, "提示信息"
Me.txtName.SetFocus
End If
If Trim(Me.txtLicNumber.Text) = "" Then
MsgBox "业主姓名不能为空,请输入!", vbOKOnly + vbInformation, "提示信息"
Me.txtLicNumber.SetFocus
End If
If Me.Option1.Value = True Then
user_sex = "男"
End If
If Me.Option2.Value = True Then
user_sex = "女"
End If
Set mItem = Me.ListView1.ListItems.Add(, "K" & Me.txtInRecNo.Text, Me.txtInRecNo.Text)
mItem.SubItems(1) = IIf(IsNull(Me.txtName.Text), "", Me.txtName.Text)
mItem.SubItems(2) = IIf(IsNull(Me.txtLicNumber.Text), "", Me.txtLicNumber.Text)
mItem.SubItems(3) = user_sex
mItem.SubItems(4) = IIf(IsNull(Me.DTPicker2.Value), Format(Date, "yyyy-mm-dd"), Format(Me.DTPicker2.Value, "yyyy-mm-dd"))
mItem.SubItems(5) = IIf(IsNull(Me.txtDoorNo.Text), "", Me.txtDoorNo.Text)
mItem.SubItems(6) = IIf(IsNull(Me.txtTel.Text), "", Me.txtTel.Text)
mItem.SubItems(7) = IIf(IsNull(Me.DTPicker1.Value), Format(Date, "yyyy-mm-dd"), Format(Me.DTPicker1.Value, "yyyy-mm-dd"))
mItem.SubItems(8) = IIf(IsNull(Me.txtNumName1.Text), "", Me.txtNumName1.Text)
mItem.SubItems(9) = IIf(IsNull(Me.txtNumName2.Text), "", Me.txtNumName2.Text)
mItem.SubItems(10) = IIf(IsNull(Me.txtNumName3.Text), "", Me.txtNumName3.Text)
mItem.SubItems(11) = IIf(IsNull(Me.txtNumName4.Text), "", Me.txtNumName4.Text)
Me.txtInRecNo.Text = ""
Me.txtName.Text = ""
Me.txtLicNumber.Text = ""
Me.txtTel.Text = ""
Me.DTPicker1.Value = Format(Date, "yyyy-mm-dd")
Me.DTPicker2.Value = Format(Date, "yyyy-mm-dd")
Me.txtDoorNo.Text = ""
Me.Option1.Value = True
Me.txtNumName1.Text = ""
Me.txtNumName2.Text = ""
Me.txtNumName3.Text = ""
Me.txtNumName4.Text = ""
End Sub
Private Sub Command3_Click()
Dim ls_sql As String
Dim i As Long
Dim ls_rec As New ADODB.Recordset
Dim ls_rectmp As New ADODB.Recordset
ls_sql = "select * from ClientList where 编号=-1"
ls_rec.Open ls_sql, g_Adoconn, 3, 3
For i = 1 To Me.ListView1.ListItems.Count
ls_rectmp.Open "select * from ClientList where ClientListID='" & Trim(Me.ListView1.ListItems(i).Text) & "'", g_Adoconn, 3, 3
If ls_rectmp.RecordCount > 0 Then
ls_rectmp.Close
Else
ls_rec.AddNew
ls_rec.Fields("ClientListID").Value = Trim(Me.ListView1.ListItems(i).Text)
ls_rec.Fields("ClientName").Value = Trim(Me.ListView1.ListItems(i).SubItems(1))
ls_rec.Fields("ClientID").Value = Trim(Me.ListView1.ListItems(i).SubItems(2))
ls_rec.Fields("ClientGender").Value = Trim(Me.ListView1.ListItems(i).SubItems(3))
ls_rec.Fields("ClientaAddress").Value = Trim(Me.ListView1.ListItems(i).SubItems(5))
If Trim(Me.ListView1.ListItems(i).SubItems(7)) <> "" Then
ls_rec.Fields("ClientDate").Value = Format(Trim(Me.ListView1.ListItems(i).SubItems(7)), "yyyy-mm-dd")
End If
If Trim(Me.ListView1.ListItems(i).SubItems(4)) <> "" Then
ls_rec.Fields("RuzhuTime").Value = Format(Trim(Me.ListView1.ListItems(i).SubItems(4)), "yyyy-mm-dd")
End If
ls_rec.Fields("TelephoneNumber").Value = Trim(Me.ListView1.ListItems(i).SubItems(6))
ls_rec.Fields("ClientFamilyName1").Value = Trim(Me.ListView1.ListItems(i).SubItems(8))
ls_rec.Fields("ClientFamilyName2").Value = Trim(Me.ListView1.ListItems(i).SubItems(9))
ls_rec.Fields("ClientFamilyName3").Value = Trim(Me.ListView1.ListItems(i).SubItems(10))
ls_rec.Fields("ClientFamilyName4").Value = Trim(Me.ListView1.ListItems(i).SubItems(11))
ls_rectmp.Close
End If
Next i
ls_rec.Update
MsgBox "保存成功!", vbOKOnly + vbInformation, "提示信息"
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Option1.Value = True
Me.ListView1.ListItems.Clear
End Sub
Private Sub ListView1_Click()
' Me.txtInRecNo.Text = Trim(Me.ListView1.SelectedItem.Text)
' Me.txtName.Text = Trim(Me.ListView1.SelectedItem.SubItems(1))
' Me.txtLicNumber.Text = Trim(Me.ListView1.SelectedItem.SubItems(2))
' Me.DTPicker1.Value = Format(IIf(IsNull(Trim(Me.ListView1.SelectedItem.SubItems(5))), Date, Trim(Me.ListView1.SelectedItem.SubItems(5))), "yyyy-mm-dd")
' Me.txtDoorNo.Text = Trim(Me.ListView1.SelectedItem.SubItems(4))
' If Me.ListView1.SelectedItem.SubItems(3) = "男" Then
' Me.Option1.Value = True
' Else
' Me.Option2.Value = True
' End If
' Me.txtNumName1.Text = Trim(Me.ListView1.SelectedItem.SubItems(6))
' Me.txtNumName2.Text = Trim(Me.ListView1.SelectedItem.SubItems(7))
' Me.txtNumName3.Text = Trim(Me.ListView1.SelectedItem.SubItems(8))
' Me.txtNumName4.Text = Trim(Me.ListView1.SelectedItem.SubItems(9))
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -