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

📄 frmhomexg.frm

📁 我VB遍的工资管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmhomexg 
   Caption         =   "查询修改户信息"
   ClientHeight    =   8505
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   9300
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   8505
   ScaleWidth      =   9300
   WindowState     =   2  'Maximized
   Begin VB.CommandButton Command2 
      Caption         =   "修改"
      Height          =   375
      Left            =   5880
      TabIndex        =   34
      Top             =   7440
      Width           =   855
   End
   Begin VB.CommandButton Command3 
      Caption         =   "重置"
      Height          =   375
      Left            =   3960
      TabIndex        =   33
      Top             =   7440
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "关闭"
      Height          =   375
      Left            =   2040
      TabIndex        =   32
      Top             =   7440
      Width           =   855
   End
   Begin VB.Frame Frame5 
      Height          =   735
      Left            =   1920
      TabIndex        =   10
      Top             =   2880
      Width           =   1695
      Begin VB.OptionButton Option4 
         Caption         =   "否"
         Height          =   375
         Left            =   960
         TabIndex        =   11
         Top             =   240
         Value           =   -1  'True
         Width           =   615
      End
      Begin VB.OptionButton Option3 
         Caption         =   "是"
         Enabled         =   0   'False
         Height          =   375
         Left            =   120
         TabIndex        =   12
         Top             =   240
         Width           =   615
      End
   End
   Begin VB.Frame Frame4 
      Caption         =   "迁出信息"
      Height          =   1215
      Left            =   120
      TabIndex        =   21
      Top             =   6000
      Width           =   9015
      Begin VB.Label Label19 
         BorderStyle     =   1  'Fixed Single
         Height          =   375
         Left            =   3840
         TabIndex        =   29
         Top             =   480
         Width           =   4695
      End
      Begin VB.Label Label12 
         Caption         =   "迁出日期:"
         Height          =   375
         Left            =   240
         TabIndex        =   24
         Top             =   600
         Width           =   975
      End
      Begin VB.Label Label13 
         Height          =   375
         Left            =   1320
         TabIndex        =   23
         Top             =   600
         Width           =   1095
      End
      Begin VB.Label Label14 
         Caption         =   "迁出到何地:"
         Height          =   375
         Left            =   2520
         TabIndex        =   22
         Top             =   600
         Width           =   1095
      End
   End
   Begin VB.Frame Frame3 
      Height          =   615
      Left            =   120
      TabIndex        =   18
      Top             =   5160
      Width           =   9015
      Begin VB.OptionButton Option1 
         Caption         =   "此户未迁出"
         Height          =   255
         Left            =   240
         TabIndex        =   20
         Top             =   240
         Value           =   -1  'True
         Width           =   1815
      End
      Begin VB.OptionButton Option2 
         Caption         =   "此户已迁出"
         Enabled         =   0   'False
         Height          =   255
         Left            =   2520
         TabIndex        =   19
         Top             =   240
         Width           =   1815
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "迁入信息"
      Height          =   1215
      Left            =   120
      TabIndex        =   14
      Top             =   3720
      Width           =   9015
      Begin VB.Label Label17 
         BorderStyle     =   1  'Fixed Single
         Height          =   375
         Left            =   3840
         TabIndex        =   28
         Top             =   480
         Width           =   4695
      End
      Begin VB.Label Label8 
         Caption         =   "迁入日期:"
         Height          =   375
         Left            =   240
         TabIndex        =   17
         Top             =   600
         Width           =   975
      End
      Begin VB.Label Label9 
         Height          =   375
         Left            =   1320
         TabIndex        =   16
         Top             =   600
         Width           =   1095
      End
      Begin VB.Label Label10 
         Caption         =   "自何地迁入:"
         Height          =   375
         Left            =   2520
         TabIndex        =   15
         Top             =   600
         Width           =   1095
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "户口记录"
      Height          =   2655
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   9015
      Begin VB.ComboBox Combo1 
         Height          =   300
         ItemData        =   "frmhomexg.frx":0000
         Left            =   1320
         List            =   "frmhomexg.frx":000D
         TabIndex        =   27
         Top             =   1080
         Width           =   1455
      End
      Begin VB.TextBox Text2 
         Height          =   375
         Left            =   1560
         MaxLength       =   150
         TabIndex        =   1
         Top             =   1800
         Width           =   4815
      End
      Begin VB.Label Label21 
         BorderStyle     =   1  'Fixed Single
         Enabled         =   0   'False
         Height          =   375
         Left            =   1560
         TabIndex        =   31
         Top             =   1800
         Visible         =   0   'False
         Width           =   4815
      End
      Begin VB.Label Label20 
         BorderStyle     =   1  'Fixed Single
         Enabled         =   0   'False
         Height          =   255
         Left            =   1320
         TabIndex        =   30
         Top             =   1080
         Visible         =   0   'False
         Width           =   1455
      End
      Begin VB.Label Label11 
         BorderStyle     =   1  'Fixed Single
         Height          =   375
         Left            =   5400
         TabIndex        =   26
         Top             =   960
         Width           =   1455
      End
      Begin VB.Label Label3 
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   1320
         TabIndex        =   25
         Top             =   360
         Width           =   1455
      End
      Begin VB.Label Label2 
         Caption         =   "户号:"
         Height          =   255
         Left            =   240
         TabIndex        =   9
         Top             =   360
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "户别:"
         Height          =   255
         Left            =   240
         TabIndex        =   8
         Top             =   1080
         Width           =   855
      End
      Begin VB.Label Label4 
         Caption         =   "户主姓名:"
         Height          =   255
         Left            =   4080
         TabIndex        =   7
         Top             =   1080
         Width           =   975
      End
      Begin VB.Label Label6 
         Caption         =   "登记日期:"
         Height          =   255
         Left            =   4080
         TabIndex        =   6
         Top             =   360
         Width           =   1095
      End
      Begin VB.Label Label7 
         Height          =   255
         Left            =   5400
         TabIndex        =   5
         Top             =   360
         Width           =   2535
      End
      Begin VB.Label Label5 
         Caption         =   "家庭住址:"
         Height          =   255
         Left            =   240
         TabIndex        =   4
         Top             =   1920
         Width           =   1095
      End
      Begin VB.Label Label16 
         Caption         =   "*"
         ForeColor       =   &H000000FF&
         Height          =   135
         Left            =   3000
         TabIndex        =   3
         Top             =   1080
         Width           =   135
      End
      Begin VB.Label Label18 
         Caption         =   "*"
         ForeColor       =   &H000000FF&
         Height          =   135
         Left            =   6600
         TabIndex        =   2
         Top             =   1920
         Width           =   135
      End
   End
   Begin VB.Label Label15 
      Caption         =   "此户是否为迁入户"
      Height          =   255
      Left            =   240
      TabIndex        =   13
      Top             =   3240
      Width           =   1575
   End
End
Attribute VB_Name = "frmhomexg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
Unload frmhomexg
'初始化主窗口
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 tname As String
Dim cnn As New ADODB.Connection
Dim ret As New ADODB.Recordset
Dim local_db As String
thuhao = Label3.Caption
tname = Label11.Caption
'检查各项是否为空
If Combo1.Text = "" Then
MsgBox "户别不能为空", , "警告"
Else
If Combo1.Text <> "非农业户口" And Combo1.Text <> "农业户口" And Combo1.Text <> "农转非户口" Then
MsgBox "请从下拉列表中选择户别", , "警告"
Else
If Text2.Text = "" Then
MsgBox "家庭住址不能为空", , "警告"
Text2.SetFocus
End If
End If
End If
If Combo1.Text <> "" And Text2.Text <> "" Then
If Combo1.Text <> temphubie Or Text2.Text <> tempzhuzhi Then
If Combo1.Text = "非农业户口" Or Combo1.Text = "农业户口" Or Combo1.Text = "农转非户口" Then
Dim hubie As String
Dim zhuzhi As String
hubie = Combo1.Text
zhuzhi = Trim(Text2.Text)
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 = "update 户口表" + _
" set 户别=" + "'" + hubie + "'," + "住址=" + "'" + zhuzhi + "'" + _
" where 户号=" + "'" + thuhao + "'and " + "户主姓名=" + "'" + tname + "'"
cnn.Execute local_db
MsgBox "户口信息修改成功", , "提示"
Unload frmhomexg
'初始化主窗口
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
End If
End If
End If
End Sub

Private Sub Command3_Click()
Label3.Caption = temphuhao2a
Label7.Caption = tempriqi2
Combo1.Text = temphubie2
Label11.Caption = tempname2
Text2.Text = tempzhuzhi2
Label17.Caption = tempqrdidian2
Label9.Caption = tempqrriqi2
End Sub

⌨️ 快捷键说明

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