⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmzxr.frm

📁 我VB遍的工资管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmzxr 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "注销人口"
   ClientHeight    =   3780
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4635
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3780
   ScaleWidth      =   4635
   Begin VB.CommandButton Command2 
      Caption         =   "进入"
      Height          =   375
      Left            =   2520
      TabIndex        =   3
      Top             =   3000
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "取消"
      Height          =   375
      Left            =   1200
      TabIndex        =   2
      Top             =   3000
      Width           =   855
   End
   Begin VB.TextBox Text1 
      Height          =   270
      Left            =   2040
      MaxLength       =   22
      TabIndex        =   1
      Top             =   1920
      Width           =   2175
   End
   Begin VB.Label Label3 
      Caption         =   "注销人口验证"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   480
      TabIndex        =   5
      Top             =   360
      Width           =   2295
   End
   Begin VB.Shape Shape1 
      Height          =   615
      Left            =   240
      Top             =   240
      Width           =   2775
   End
   Begin VB.Label Label4 
      Caption         =   "·输入正确身份证号才能进入注销人口页面"
      ForeColor       =   &H00000080&
      Height          =   255
      Left            =   360
      TabIndex        =   4
      Top             =   1200
      Width           =   3495
   End
   Begin VB.Image Image1 
      Height          =   495
      Left            =   3360
      Picture         =   "frmzxr.frx":0000
      Top             =   240
      Width           =   510
   End
   Begin VB.Line Line1 
      X1              =   0
      X2              =   4680
      Y1              =   2640
      Y2              =   2640
   End
   Begin VB.Label Label1 
      Caption         =   "请输入身份证号:"
      Height          =   375
      Left            =   360
      TabIndex        =   0
      Top             =   1920
      Width           =   1455
   End
End
Attribute VB_Name = "frmzxr"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
Unload frmzxr
'初始化主窗口
mainfrm.guanli.Enabled = True
mainfrm.chaxun.Enabled = True
mainfrm.tongji.Enabled = True
If userid = "admin" Then
mainfrm.xitong.Enabled = True
mainfrm.bdb.Enabled = True
Else
mainfrm.xitong.Enabled = False
mainfrm.bdb.Enabled = False
End If
mainfrm.Command1.Enabled = True
mainfrm.Command2.Enabled = True
mainfrm.Command3.Enabled = True
If userid = "admin" Then
mainfrm.Command4.Enabled = True
Else
mainfrm.Command4.Enabled = False
End If
GetStatus "<就绪>"
End Sub

Private Sub Command2_Click()
Dim tidcard As String
Dim cnn As New ADODB.Connection
Dim ret As New ADODB.Recordset
Dim local_db As String
tidcard = Trim(Text1.Text)
If Text1.Text = "" Then
MsgBox "请输入要注销人员的身份证号", , "警告"
Text1.SetFocus
Else
Dim th As String
th = "户主"
Set cnn = New ADODB.Connection
Set ret = New ADODB.Recordset
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path & "\data\db.mdb" + ";Persist Security Info=False;"
local_db = "select 姓名 from 人口表" + _
" where 人口表.身份证号=" + "'" + tidcard + "' and " + "与户主关系=" + "'" + th + "'"
ret.Open local_db, cnn
If Not (ret.BOF And ret.EOF) Then
MsgBox "此人为户主,不能注销,请注销此户籍后办理新户", , "警告"
Text1.Text = ""
Text1.SetFocus
Else
ret.Close
Set ret = New ADODB.Recordset
local_db = "select * from 人口表" + _
" where 人口表.身份证号=" + "'" + tidcard + "'"
ret.Open local_db, cnn
If ret.BOF And ret.EOF Then
MsgBox "无此身份证号,请重新输入"
Text1.Text = ""
Text1.SetFocus
Else
Dim d1 As String
frmqcren.Command2.Visible = True
frmqcren.Command2.Enabled = True
frmqcren.Command3.Visible = True
frmqcren.Command3.Enabled = True
frmqcren.Label33.Visible = True
frmqcren.Label33.Enabled = True
frmqcren.Text8.Enabled = False
frmqcren.Text8.Visible = False
frmqcren.Label25.Visible = False
frmqcren.Command5.Visible = False
frmqcren.Command5.Enabled = False
frmqcren.Command1.Visible = False
frmqcren.Command1.Enabled = False
frmqcren.Frame1.Enabled = True
frmqcren.Frame1.Visible = True
frmqcren.Caption = "注销人口"
frmqcren.Label26.Caption = ""
frmqcren.Label2.Caption = ret("户号")
frmqcren.Label38.Caption = ret("姓名")
frmqcren.Label3.Caption = ret("与户主关系")
frmqcren.Label39.Caption = ret("身份证号")
frmqcren.Label4.Caption = ret("性别")
frmqcren.Label8.Caption = ret("民族")
frmqcren.Label29.Caption = ret("籍贯")
d1 = ret("出生日期")
frmqcren.Label30.Caption = Mid(d1, 1, 4)
frmqcren.Label31.Caption = Mid(d1, 5, 2)
frmqcren.Label36.Caption = Mid(d1, 7, 2)
frmqcren.Label34.Caption = ret("出生地")
frmqcren.Label41.Caption = ret("文化程度")
frmqcren.Label6.Caption = ret("婚姻状况")
frmqcren.Label40.Caption = ret("职业")
frmqcren.Label43.Caption = ret("工作单位")
frmqcren.Label23.Caption = ret("迁入日期")
frmqcren.Label28.Caption = ret("何地迁入")
ret.Close
Set ret = New ADODB.Recordset
local_db = "select * from 人迁出表" + _
" where 人迁出表.身份证号=" + "'" + tidcard + "'"
ret.Open local_db, cnn
If Not (ret.BOF And ret.EOF) Then
frmqcren.Option1.Enabled = False
frmqcren.Option1.Value = False
frmqcren.Option2.Enabled = True
frmqcren.Option2.Value = True
frmqcren.Label26.Caption = ret("迁出日期")
frmqcren.Label33.Caption = ret("迁往何地")
End If
Unload frmzxr
frmqcren.Show
End If
End If
End If
End Sub

⌨️ 快捷键说明

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