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

📄 frmqcr.frm

📁 我VB遍的工资管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmqcr 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "迁出人口"
   ClientHeight    =   3885
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4530
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3885
   ScaleWidth      =   4530
   Begin VB.CommandButton Command2 
      Caption         =   "进入"
      Height          =   375
      Left            =   2520
      TabIndex        =   3
      Top             =   3120
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "取消"
      Height          =   375
      Left            =   1080
      TabIndex        =   2
      Top             =   3120
      Width           =   855
   End
   Begin VB.TextBox Text1 
      Height          =   270
      Left            =   1920
      MaxLength       =   22
      TabIndex        =   1
      Top             =   1920
      Width           =   2175
   End
   Begin VB.Image Image1 
      Height          =   495
      Left            =   3360
      Picture         =   "frmqcr.frx":0000
      Top             =   240
      Width           =   510
   End
   Begin VB.Label Label4 
      Caption         =   "·输入正确身份证号才能进入迁出人口页面"
      ForeColor       =   &H00000080&
      Height          =   255
      Left            =   360
      TabIndex        =   5
      Top             =   1200
      Width           =   3495
   End
   Begin VB.Shape Shape1 
      Height          =   615
      Left            =   240
      Top             =   240
      Width           =   2775
   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        =   4
      Top             =   360
      Width           =   2295
   End
   Begin VB.Line Line1 
      X1              =   0
      X2              =   4560
      Y1              =   2760
      Y2              =   2760
   End
   Begin VB.Label Label1 
      Caption         =   "请输入身份证号:"
      Height          =   375
      Left            =   360
      TabIndex        =   0
      Top             =   1920
      Width           =   1455
   End
End
Attribute VB_Name = "frmqcr"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
Unload frmqcr
'初始化主窗口
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
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 + "'"
ret.Open local_db, cnn
If Not (ret.BOF And ret.EOF) Then
MsgBox "此人已迁出,要查询此人信息请使用查询菜单中的相应功能", , "警告"
Unload frmqcr
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
Else
ret.Close
Dim th As String
th = "户主"
Set ret = New ADODB.Recordset
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.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("何地迁入")
Unload frmqcr
frmqcren.Show
End If
End If
End If
End If
End Sub

⌨️ 快捷键说明

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