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

📄 frmchuhao.frm

📁 我VB遍的工资管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmchuhao 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "查询户号"
   ClientHeight    =   3030
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4575
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3030
   ScaleWidth      =   4575
   Begin VB.Frame Frame2 
      Caption         =   "查询户号"
      Height          =   2775
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   4335
      Begin VB.CommandButton Command1 
         Caption         =   "关闭"
         Height          =   375
         Left            =   1680
         TabIndex        =   6
         Top             =   2160
         Width           =   855
      End
      Begin VB.TextBox Text3 
         Height          =   270
         Left            =   480
         MaxLength       =   22
         TabIndex        =   2
         Top             =   840
         Width           =   2055
      End
      Begin VB.CommandButton Command2 
         Caption         =   "查询"
         Height          =   375
         Left            =   2880
         TabIndex        =   1
         Top             =   840
         Width           =   855
      End
      Begin VB.Label Label3 
         Caption         =   "请输入该户户主身份证号:"
         Height          =   255
         Left            =   360
         TabIndex        =   5
         Top             =   360
         Width           =   3495
      End
      Begin VB.Label Label4 
         Caption         =   "户号为:"
         Height          =   255
         Left            =   360
         TabIndex        =   4
         Top             =   1560
         Width           =   975
      End
      Begin VB.Label Label7 
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   1560
         TabIndex        =   3
         Top             =   1560
         Width           =   2175
      End
   End
End
Attribute VB_Name = "frmchuhao"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
Unload frmchuhao
'初始化主窗口
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 sf As String
Dim hz As String
Dim cnn As New ADODB.Connection
Dim ret As New ADODB.Recordset
hz = "户主"
Dim local_db As String
If Text3.Text = "" Then
MsgBox "请输入户主身份证号", , "警告"
Text3.SetFocus
Else
sf = Trim(Text3.Text)
'连接数据库
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path & "\data\db.mdb" + ";Persist Security Info=False;"
local_db = "select 户号 from 人口表" + _
" where 人口表.身份证号=" + "'" + sf + "'" + "and 人口表.与户主关系=" + "'" + hz + "'"
ret.Open local_db, cnn
If ret.BOF And ret.EOF Then
MsgBox "无此身份证号,或不是户主身份证号", , "警告"
Text3.Text = ""
Text3.SetFocus
Else
Label7.Caption = ret("户号")
End If
End If
End Sub

⌨️ 快捷键说明

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