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

📄 ts2.frm

📁 我VB遍的工资管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form ts2 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "迁出人口"
   ClientHeight    =   1380
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   3060
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1380
   ScaleWidth      =   3060
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   1680
      TabIndex        =   2
      Top             =   840
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   480
      TabIndex        =   1
      Top             =   840
      Width           =   855
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "确实要迁出此人吗?"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   0
      Top             =   360
      Width           =   2295
   End
End
Attribute VB_Name = "ts2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
Dim qcriqi As String
Dim qwhedi As String
Dim xingming As String
Dim idcard As String
Dim huhao As String
Dim y1 As String
y1 = "是"
qcriqi = frmqcren.Label26.Caption
qwhedi = Trim(frmqcren.Text8.Text)
xingming = frmqcren.Label38.Caption
idcard = frmqcren.Label39.Caption
huhao = frmqcren.Label2.Caption
Dim cnn As New ADODB.Connection
Dim ret As New ADODB.Recordset
Dim local_db As String
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 = "insert into 人迁出表 (" + "迁出日期," + "迁往何地," + "姓名," + "身份证号," + "户号)" + _
" values (" + "'" + qcriqi + "'," + "'" + qwhedi + "'," + "'" + xingming + "'," + "'" + idcard + "'," + "'" + huhao + "')"
cnn.Execute local_db
Set ret = New ADODB.Recordset
local_db = "update 人口表" + _
" set 是否已迁出=" + "'" + y1 + "'" + _
" where 人口表.身份证号=" + "'" + idcard + "'"
cnn.Execute local_db
Unload ts2
Unload frmqcren
MsgBox "已经成功将此人迁出,仍可以查询到此人信息,但无法修改信息", , "提示"
mainfrm.Enabled = True
'初始化主窗口
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 Sub

Private Sub Command2_Click()
Unload ts2
frmqcren.Enabled = True
mainfrm.Enabled = True
End Sub

⌨️ 快捷键说明

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