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

📄 frmcxp.frm

📁 我VB遍的工资管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmcxp 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "查询人口"
   ClientHeight    =   3585
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4605
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3585
   ScaleWidth      =   4605
   Begin VB.CommandButton Command2 
      Caption         =   "查询"
      Height          =   375
      Left            =   2640
      TabIndex        =   3
      Top             =   2880
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "取消"
      Height          =   375
      Left            =   1200
      TabIndex        =   2
      Top             =   2880
      Width           =   855
   End
   Begin VB.TextBox Text1 
      Height          =   270
      Left            =   2160
      MaxLength       =   22
      TabIndex        =   1
      Top             =   1800
      Width           =   2175
   End
   Begin VB.Image Image1 
      Height          =   540
      Left            =   3720
      Picture         =   "frmcxp.frx":0000
      Top             =   240
      Width           =   750
   End
   Begin VB.Label Label4 
      Caption         =   "·输入正确身份证号才能进入相应人口信息页面"
      ForeColor       =   &H00000080&
      Height          =   255
      Left            =   360
      TabIndex        =   5
      Top             =   1200
      Width           =   3855
   End
   Begin VB.Shape Shape1 
      Height          =   615
      Left            =   240
      Top             =   240
      Width           =   3375
   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           =   2775
   End
   Begin VB.Line Line1 
      X1              =   0
      X2              =   4560
      Y1              =   2520
      Y2              =   2520
   End
   Begin VB.Label Label1 
      Caption         =   "请输入身份证号:"
      Height          =   375
      Left            =   360
      TabIndex        =   0
      Top             =   1800
      Width           =   1455
   End
End
Attribute VB_Name = "frmcxp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
Unload frmcxp
'初始化主窗口
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
frmpeoplexg.Label26.Caption = ret("迁出日期")
frmpeoplexg.Label37.Caption = ret("迁往何地")
frmpeoplexg.Option1.Value = False
frmpeoplexg.Option2.Value = True
frmpeoplexg.Option1.Enabled = False
frmpeoplexg.Option2.Enabled = True
frmpeoplexg.Frame5.Enabled = True
frmpeoplexg.Label27.Enabled = True
frmpeoplexg.Label26.Enabled = True
frmpeoplexg.Label25.Enabled = True
frmpeoplexg.Label37.Enabled = True
frmpeoplexg.Command2.Enabled = False
frmpeoplexg.Command3.Enabled = False
ret.Close
flag = 1
End If
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
flag = 1
If flag = 1 Then
Dim d1 As String
frmpeoplexg.Label2.Caption = ret("户号")
If frmpeoplexg.Option1.Value = True Then
frmpeoplexg.Text9.Text = ret("姓名")
frmpeoplexg.Label6.Visible = True
tempname1 = frmpeoplexg.Text9.Text
Else
frmpeoplexg.Label38.Enabled = True
frmpeoplexg.Label38.Visible = True
frmpeoplexg.Text9.Enabled = False
frmpeoplexg.Text9.Visible = False
frmpeoplexg.Label38.Caption = ret("姓名")
End If
frmpeoplexg.Label3.Caption = ret("与户主关系")
tempguanxi1 = frmpeoplexg.Label3.Caption
If frmpeoplexg.Option1.Value = True Then
frmpeoplexg.Text1.Text = ret("身份证号")
tempidcard1 = frmpeoplexg.Text1.Text
Else
frmpeoplexg.Label39.Enabled = True
frmpeoplexg.Label39.Visible = True
frmpeoplexg.Text1.Enabled = False
frmpeoplexg.Text1.Visible = False
frmpeoplexg.Label39.Caption = ret("身份证号")
frmpeoplexg.Label28.Visible = False
End If
frmpeoplexg.Label4.Caption = ret("性别")
tempxingbie1 = frmpeoplexg.Label4.Caption
frmpeoplexg.Label8.Caption = ret("民族")
tempmingzu1 = frmpeoplexg.Label8.Caption
frmpeoplexg.Label29.Caption = ret("籍贯")
tempjiguan1 = frmpeoplexg.Label29.Caption
d1 = ret("出生日期")
frmpeoplexg.Label30.Caption = Mid(d1, 1, 4)
tempdate11 = frmpeoplexg.Label30.Caption
frmpeoplexg.Label31.Caption = Mid(d1, 5, 2)
tempdate12 = frmpeoplexg.Label31.Caption
frmpeoplexg.Label36.Caption = Mid(d1, 7, 2)
tempdate13 = frmpeoplexg.Label36.Caption
frmpeoplexg.Label34.Caption = ret("出生地")
tempchushengdi1 = frmpeoplexg.Label34.Caption
If frmpeoplexg.Option1.Value = True Then
frmpeoplexg.Combo1.Text = ret("文化程度")
tempwenhua1 = frmpeoplexg.Combo1.Text
Else
frmpeoplexg.Label41.Enabled = True
frmpeoplexg.Label41.Visible = True
frmpeoplexg.Combo1.Enabled = False
frmpeoplexg.Combo1.Visible = False
frmpeoplexg.Label41.Caption = ret("文化程度")
frmpeoplexg.Label33.Visible = False
End If
If frmpeoplexg.Option1.Value = True Then
frmpeoplexg.Combo2.Text = ret("婚姻状况")
temphunyin1 = frmpeoplexg.Combo2.Text
Else
frmpeoplexg.Label42.Enabled = True
frmpeoplexg.Label42.Visible = True
frmpeoplexg.Combo2.Enabled = False
frmpeoplexg.Combo2.Visible = False
frmpeoplexg.Label42.Caption = ret("婚姻状况")
frmpeoplexg.Label35.Visible = False
End If
If frmpeoplexg.Option1.Value = True Then
frmpeoplexg.Text5.Text = ret("职业")
tempzhiye1 = frmpeoplexg.Text5.Text
Else
frmpeoplexg.Label40.Enabled = True
frmpeoplexg.Label40.Visible = True
frmpeoplexg.Text5.Enabled = False
frmpeoplexg.Text5.Visible = False
frmpeoplexg.Label40.Caption = ret("职业")
End If
If frmpeoplexg.Option1.Value = True Then
frmpeoplexg.Text6.Text = ret("工作单位")
tempdanwei1 = frmpeoplexg.Text6.Text
Else
frmpeoplexg.Label43.Enabled = True
frmpeoplexg.Label43.Visible = True
frmpeoplexg.Text6.Enabled = False
frmpeoplexg.Text6.Visible = False
frmpeoplexg.Label43.Caption = ret("工作单位")
End If
frmpeoplexg.Label23.Caption = ret("迁入日期")
tempqrriqi1 = frmpeoplexg.Label23.Caption
frmpeoplexg.Label32.Caption = ret("何地迁入")
tempqrdidian1 = frmpeoplexg.Label32.Caption
Unload frmcxp
frmpeoplexg.Show
tempname = frmpeoplexg.Text9.Text
tempidcard = frmpeoplexg.Text1.Text
tempwenhua = frmpeoplexg.Combo1.Text
temphunyin = frmpeoplexg.Combo2.Text
End If
End If
End If
End Sub

⌨️ 快捷键说明

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