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

📄 frmcxh.frm

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

Private Sub Command1_Click()
Unload frmcxh
'初始化主窗口
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 thuhao As String
Dim cnn As New ADODB.Connection
Dim ret As New ADODB.Recordset
Dim local_db As String
thuhao = Trim(Text1.Text) & Label2.Caption & Trim(Text2.Text)
If Text1.Text = "" Or Text2.Text = "" Then
MsgBox "户号未输入或格式不正确", , "警告"
Text1.Text = ""
Text2.Text = ""
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 户迁出表.户号=" + "'" + thuhao + "'"
ret.Open local_db, cnn
If Not (ret.BOF And ret.EOF) Then
frmhomexg.Label13.Caption = ret("迁出日期")
frmhomexg.Label19.Caption = ret("迁往何地")
frmhomexg.Label20.Enabled = True
frmhomexg.Label20.Visible = True
frmhomexg.Combo1.Enabled = False
frmhomexg.Combo1.Visible = False
frmhomexg.Label16.Visible = False
frmhomexg.Label21.Enabled = True
frmhomexg.Label21.Visible = True
frmhomexg.Text2.Enabled = False
frmhomexg.Text2.Visible = False
frmhomexg.Label18.Visible = False
frmhomexg.Option1.Enabled = False
frmhomexg.Option1.Value = False
frmhomexg.Option2.Value = True
frmhomexg.Option2.Enabled = True
frmhomexg.Command3.Enabled = False
frmhomexg.Command2.Enabled = False
ret.Close
flag = 1
End If
Set ret = New ADODB.Recordset
local_db = "select * from 户口表" + _
" where 户口表.户号=" + "'" + thuhao + "'"
ret.Open local_db, cnn
If ret.BOF And ret.EOF Then
MsgBox "无此户号,请重新输入"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
Else
flag = 1
End If
If flag = 1 Then
frmhomexg.Label3.Caption = ret("户号")
temphuhao2a = frmhomexg.Label3.Caption
frmhomexg.Label7.Caption = ret("登记日期")
tempriqi2 = frmhomexg.Label7.Caption
If frmhomexg.Option1.Value = True Then
frmhomexg.Combo1.Text = ret("户别")
frmhomexg.Label16.Visible = True
temphubie2 = frmhomexg.Combo1.Text
Else
frmhomexg.Label20.Enabled = True
frmhomexg.Label20.Visible = True
frmhomexg.Combo1.Enabled = False
frmhomexg.Combo1.Visible = False
frmhomexg.Label20.Caption = ret("户别")
End If
frmhomexg.Label11.Caption = ret("户主姓名")
tempname2 = frmhomexg.Label11.Caption
If frmhomexg.Option1.Value = True Then
frmhomexg.Text2.Text = ret("住址")
frmhomexg.Label18.Visible = True
tempzhuzhi2 = frmhomexg.Text2.Text
Else
frmhomexg.Label21.Enabled = True
frmhomexg.Label21.Visible = True
frmhomexg.Text2.Enabled = False
frmhomexg.Text2.Visible = False
frmhomexg.Label21.Caption = ret("住址")
End If
frmhomexg.Label9.Caption = ret("迁入日期")
tempqrriqi2 = frmhomexg.Label9.Caption
frmhomexg.Label17.Caption = ret("何地迁入")
tempqrdidian2 = frmhomexg.Label17.Caption
If frmhomexg.Label9.Caption <> "" And frmhomexg.Label17.Caption <> "" Then
frmhomexg.Option4.Enabled = False
frmhomexg.Option4.Value = False
frmhomexg.Option3.Enabled = True
frmhomexg.Option3.Value = True
End If
Unload frmcxh
frmhomexg.Show
temphubie = frmhomexg.Combo1.Text
tempzhuzhi = frmhomexg.Text2.Text
End If
End If
End Sub

⌨️ 快捷键说明

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