frm_sqjz_lddx.frm

来自「人口信息管理系统 人口信息管理 查询 修改 删除」· FRM 代码 · 共 482 行

FRM
482
字号
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frm_SQJZ_GZDX 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "工作对象管理"
   ClientHeight    =   6360
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7305
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6360
   ScaleWidth      =   7305
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text15 
      Height          =   375
      Left            =   3240
      TabIndex        =   47
      Text            =   "111"
      Top             =   5880
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.TextBox Text13 
      Height          =   375
      Left            =   2280
      TabIndex        =   46
      Text            =   "Text13"
      Top             =   5880
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.Frame Frame1 
      Caption         =   "基本信息"
      Height          =   2600
      Left            =   120
      TabIndex        =   13
      Top             =   120
      Width           =   7095
      Begin VB.TextBox Text1 
         Height          =   300
         Left            =   1080
         TabIndex        =   28
         Top             =   240
         Width           =   1630
      End
      Begin VB.TextBox Text2 
         Height          =   300
         Left            =   3720
         TabIndex        =   27
         Top             =   240
         Width           =   1455
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         ItemData        =   "frm_SQJZ_LDDX.frx":0000
         Left            =   6120
         List            =   "frm_SQJZ_LDDX.frx":000A
         TabIndex        =   26
         Text            =   "男"
         Top             =   240
         Width           =   735
      End
      Begin VB.TextBox Text3 
         Height          =   300
         Left            =   2400
         TabIndex        =   24
         Text            =   "Text3"
         Top             =   720
         Width           =   320
      End
      Begin VB.ComboBox Combo2 
         Height          =   300
         ItemData        =   "frm_SQJZ_LDDX.frx":0016
         Left            =   3720
         List            =   "frm_SQJZ_LDDX.frx":003B
         TabIndex        =   23
         Text            =   "大学"
         Top             =   720
         Width           =   1455
      End
      Begin VB.ComboBox Combo3 
         Height          =   300
         ItemData        =   "frm_SQJZ_LDDX.frx":008F
         Left            =   6120
         List            =   "frm_SQJZ_LDDX.frx":00A2
         TabIndex        =   22
         Text            =   "未婚"
         Top             =   720
         Width           =   735
      End
      Begin VB.TextBox Text4 
         Height          =   300
         Left            =   1080
         TabIndex        =   21
         Top             =   1200
         Width           =   1630
      End
      Begin VB.TextBox Text5 
         Height          =   300
         Left            =   3720
         TabIndex        =   20
         Top             =   1200
         Width           =   1455
      End
      Begin VB.TextBox Text6 
         Height          =   300
         Left            =   6120
         TabIndex        =   19
         Top             =   1200
         Width           =   735
      End
      Begin VB.TextBox Text7 
         Height          =   300
         Left            =   1080
         TabIndex        =   18
         Top             =   1680
         Width           =   1630
      End
      Begin VB.TextBox Text8 
         Height          =   300
         Left            =   3720
         TabIndex        =   17
         Top             =   1680
         Width           =   1455
      End
      Begin VB.TextBox Text9 
         Height          =   300
         Left            =   6120
         TabIndex        =   16
         Top             =   1680
         Width           =   735
      End
      Begin VB.TextBox Text10 
         Height          =   300
         Left            =   1080
         TabIndex        =   15
         Top             =   2160
         Width           =   1630
      End
      Begin VB.TextBox Text11 
         Height          =   300
         Left            =   3720
         TabIndex        =   14
         Top             =   2160
         Width           =   3135
      End
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   300
         Left            =   1080
         TabIndex        =   25
         Top             =   720
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   529
         _Version        =   393216
         Format          =   19791873
         CurrentDate     =   38157
      End
      Begin VB.Label Label1 
         Caption         =   "姓   名"
         Height          =   255
         Left            =   240
         TabIndex        =   42
         Top             =   360
         Width           =   855
      End
      Begin VB.Label Label2 
         Caption         =   "身份证号"
         Height          =   255
         Left            =   2880
         TabIndex        =   41
         Top             =   360
         Width           =   855
      End
      Begin VB.Label Label3 
         Caption         =   "性   别"
         Height          =   255
         Left            =   5280
         TabIndex        =   40
         Top             =   360
         Width           =   735
      End
      Begin VB.Label Label4 
         Caption         =   "出生日期"
         Height          =   255
         Left            =   240
         TabIndex        =   39
         Top             =   840
         Width           =   855
      End
      Begin VB.Label Label5 
         Caption         =   "文化程度"
         Height          =   255
         Left            =   2880
         TabIndex        =   38
         Top             =   840
         Width           =   855
      End
      Begin VB.Label Label6 
         Caption         =   "婚姻状况"
         Height          =   375
         Left            =   5280
         TabIndex        =   37
         Top             =   840
         Width           =   855
      End
      Begin VB.Label Label7 
         Caption         =   "楼   号"
         Height          =   375
         Left            =   240
         TabIndex        =   36
         Top             =   1320
         Width           =   975
      End
      Begin VB.Label Label8 
         Caption         =   "户   号"
         Height          =   375
         Left            =   2880
         TabIndex        =   35
         Top             =   1320
         Width           =   855
      End
      Begin VB.Label Label9 
         Caption         =   "家庭人数"
         Height          =   375
         Left            =   5280
         TabIndex        =   34
         Top             =   1320
         Width           =   855
      End
      Begin VB.Label Label10 
         Caption         =   "经济状况"
         Height          =   255
         Left            =   240
         TabIndex        =   33
         Top             =   1800
         Width           =   735
      End
      Begin VB.Label Label11 
         Caption         =   "住所类型"
         Height          =   255
         Left            =   2880
         TabIndex        =   32
         Top             =   1800
         Width           =   735
      End
      Begin VB.Label Label12 
         Caption         =   "月 收 入"
         Height          =   255
         Left            =   5280
         TabIndex        =   31
         Top             =   1800
         Width           =   735
      End
      Begin VB.Label Label13 
         Caption         =   "家庭电话"
         Height          =   255
         Left            =   240
         TabIndex        =   30
         Top             =   2280
         Width           =   855
      End
      Begin VB.Label Label14 
         Caption         =   "住   址"
         Height          =   255
         Left            =   2880
         TabIndex        =   29
         Top             =   2280
         Width           =   735
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "工作对象"
      Height          =   3000
      Left            =   120
      TabIndex        =   3
      Top             =   2760
      Width           =   7095
      Begin VB.TextBox Text12 
         Height          =   710
         Left            =   1080
         TabIndex        =   45
         Top             =   1200
         Width           =   5775
      End
      Begin VB.ComboBox Combo5 
         Height          =   300
         ItemData        =   "frm_SQJZ_LDDX.frx":00C4
         Left            =   3720
         List            =   "frm_SQJZ_LDDX.frx":00DA
         TabIndex        =   44
         Top             =   240
         Width           =   3135
      End
      Begin VB.ComboBox Combo4 
         Height          =   300
         ItemData        =   "frm_SQJZ_LDDX.frx":0112
         Left            =   1080
         List            =   "frm_SQJZ_LDDX.frx":011F
         TabIndex        =   43
         Top             =   240
         Width           =   1630
      End
      Begin VB.TextBox Text14 
         Height          =   735
         Left            =   1080
         TabIndex        =   6
         Top             =   2080
         Width           =   5775
      End
      Begin VB.TextBox Text16 
         Height          =   300
         Left            =   3720
         TabIndex        =   5
         Top             =   720
         Width           =   3135
      End
      Begin MSComCtl2.DTPicker DTPicker2 
         Height          =   300
         Left            =   1080
         TabIndex        =   4
         Top             =   720
         Width           =   1630
         _ExtentX        =   2884
         _ExtentY        =   529
         _Version        =   393216
         Format          =   19791873
         CurrentDate     =   38157
      End
      Begin VB.Label Label15 
         Caption         =   "人员类别"
         Height          =   255
         Left            =   240
         TabIndex        =   12
         Top             =   360
         Width           =   855
      End
      Begin VB.Label Label16 
         Caption         =   "监管原因"
         Height          =   375
         Left            =   2880
         TabIndex        =   11
         Top             =   360
         Width           =   1095
      End
      Begin VB.Label Label17 
         Caption         =   "初犯地点"
         Height          =   255
         Left            =   2880
         TabIndex        =   10
         Top             =   840
         Width           =   855
      End
      Begin VB.Label Label18 
         Caption         =   "初犯日期"
         Height          =   255
         Left            =   240
         TabIndex        =   9
         Top             =   840
         Width           =   735
      End
      Begin VB.Label Label19 
         Caption         =   "记   事"
         Height          =   375
         Left            =   240
         TabIndex        =   8
         Top             =   1320
         Width           =   855
      End
      Begin VB.Label Label22 
         Caption         =   "备   注"
         Height          =   375
         Left            =   240
         TabIndex        =   7
         Top             =   2280
         Width           =   735
      End
   End
   Begin VB.CommandButton Cmd_cancel 
      Caption         =   "取消"
      Height          =   375
      Left            =   6000
      TabIndex        =   2
      Top             =   5880
      Width           =   1095
   End
   Begin VB.CommandButton Cmd_add 
      Caption         =   "增加"
      Height          =   375
      Left            =   4800
      TabIndex        =   1
      Top             =   5880
      Width           =   1095
   End
   Begin VB.CommandButton Cmd_select 
      Caption         =   "选择居民"
      Height          =   375
      Left            =   720
      TabIndex        =   0
      Top             =   5880
      Width           =   1455
   End
End
Attribute VB_Name = "frm_SQJZ_GZDX"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmd_add_Click()
Call main
frm_CZRK_HKB.Adodc1.RecordSource = "select * from Table_HKB where 姓名='" + Text1.Text + "'"
frm_CZRK_HKB.Adodc1.Refresh
If frm_CZRK_HKB.Adodc1.Recordset.RecordCount > 0 Then
 frm_SQJZ_ZB.Adodc1.RecordSource = "select * from Table_SQJZ_GZDX where 姓名='" + Text1.Text + "'"
 frm_SQJZ_ZB.Adodc1.Refresh
 If frm_SQJZ_ZB.Adodc1.Recordset.RecordCount > 0 Then
MsgBox "此人的信息已经存在,输入不能继续", 48, "提示"
Else
Text13.Text = frm_CZRK_HKB.Adodc1.Recordset.Fields("人口编号")
Set adoRs = adoCon.Execute("insert into Table_SQJZ_GZDX values(" & Text15 & ",'" & Text13 & "','" & Text1 & "','" & Text2 & "','" & Combo1 & "','" & DTPicker1 & "','" & Text3 & "','" & Combo2 & "','" & Combo3 & "','" & Text4 & "','" & Text5 & "','" & Text6 & "','" & Text7 & "','" & Text8 & "','" & Text9 & "','" & Text10 & "','" & Text11 & "','" & Combo4 & "','" & Combo5 & "','" & DTPicker2 & "','" & Text16 & "','" & Text12 & "','" & Text14 & "')")
MsgBox "数据保存成功!", 32, "人口信息管理系统"
Unload Me
frm_SQJZ_ZB.Adodc1.Refresh
End If
Else
MsgBox "数据库中没有此人的信息", 48, "提示"
End If
adoCon.Close
End Sub

Private Sub Cmd_cancel_Click()
Unload Me
End Sub

Private Sub Cmd_select_Click()
frm_SQJZ_ryxz.Show
End Sub

Private Sub Combo4_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo5.SetFocus
Else
End If
End Sub

Private Sub Combo5_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
DTPicker2.SetFocus
Else
End If
End Sub

Private Sub DTPicker2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text16.SetFocus
Else
End If
End Sub

Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2

End Sub

Private Sub Text12_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text14.SetFocus
Else
End If
End Sub

Private Sub Text16_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text12.SetFocus
Else
End If
End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?