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

📄 form3.frm

📁 一个人员信息管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.Form Form3 
   BackColor       =   &H00E0E0E0&
   Caption         =   "Form3"
   ClientHeight    =   3495
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   3570
   LinkTopic       =   "Form3"
   ScaleHeight     =   3495
   ScaleWidth      =   3570
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame1 
      Height          =   2895
      Left            =   120
      TabIndex        =   2
      Top             =   0
      Width           =   3375
      Begin VB.TextBox Text7 
         Height          =   375
         Left            =   1320
         TabIndex        =   17
         Top             =   2400
         Width           =   975
      End
      Begin VB.CommandButton Command3 
         Caption         =   "浏览.."
         Height          =   375
         Left            =   2400
         TabIndex        =   16
         Top             =   2400
         Width           =   735
      End
      Begin VB.TextBox Text6 
         Height          =   375
         Left            =   1320
         TabIndex        =   8
         Top             =   2040
         Width           =   1335
      End
      Begin VB.TextBox Text5 
         Height          =   375
         Left            =   1320
         TabIndex        =   7
         Top             =   1680
         Width           =   1335
      End
      Begin VB.TextBox Text4 
         Height          =   375
         Left            =   1320
         TabIndex        =   6
         Top             =   1320
         Width           =   1335
      End
      Begin VB.TextBox Text3 
         Height          =   375
         Left            =   1320
         TabIndex        =   5
         Top             =   960
         Width           =   1335
      End
      Begin VB.TextBox Text2 
         Height          =   375
         Left            =   1320
         TabIndex        =   4
         Top             =   600
         Width           =   1335
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   1320
         TabIndex        =   3
         Top             =   240
         Width           =   1335
      End
      Begin VB.Label Label7 
         Caption         =   "照片"
         Height          =   255
         Left            =   240
         TabIndex        =   15
         Top             =   2520
         Width           =   975
      End
      Begin VB.Label Label6 
         Caption         =   "民族"
         Height          =   255
         Left            =   240
         TabIndex        =   14
         Top             =   2160
         Width           =   735
      End
      Begin VB.Label Label5 
         Caption         =   "出生日期"
         Height          =   255
         Left            =   240
         TabIndex        =   13
         Top             =   1800
         Width           =   855
      End
      Begin VB.Label Label4 
         Caption         =   "公民身份号码"
         Height          =   255
         Left            =   120
         TabIndex        =   12
         Top             =   1440
         Width           =   1095
      End
      Begin VB.Label Label3 
         Caption         =   "性别"
         Height          =   255
         Left            =   240
         TabIndex        =   11
         Top             =   1080
         Width           =   615
      End
      Begin VB.Label Label2 
         Caption         =   "姓名"
         Height          =   255
         Left            =   240
         TabIndex        =   10
         Top             =   720
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "人员编号"
         Height          =   255
         Left            =   240
         TabIndex        =   9
         Top             =   360
         Width           =   735
      End
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   240
      Top             =   3000
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.CommandButton Command2 
      Caption         =   "返回"
      Height          =   375
      Left            =   1920
      TabIndex        =   1
      Top             =   3000
      Width           =   735
   End
   Begin VB.CommandButton Command1 
      Caption         =   "保存"
      Height          =   375
      Left            =   960
      TabIndex        =   0
      Top             =   3000
      Width           =   735
   End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset

Private Sub Command1_Click()

cn.Open "Test", "sa"
 rs.Open "select * from  MemInf where RYBH=" + Text1.Text + "", cn, adOpenKeyset, adLockOptimistic
  
 rs.Fields(1) = Trim(Text2.Text)
 rs.Fields(2) = Trim(Text3.Text)
rs.Fields(3) = Trim(Text4.Text)
rs.Fields(4) = Trim(Text5.Text)
rs.Fields(5) = Trim(Text6.Text)
Dim stm As ADODB.Stream
Set stm = New ADODB.Stream
stm.Type = adTypeBinary
stm.Open

rs.Fields(6) = stm.Read


MsgBox "数据保存成功!!", 32, "人员信息"

Form3.Visible = False
rs.Update
Form2.DataGrid1.Columns(1) = rs.Fields(1)
Form2.DataGrid1.Columns(2) = rs.Fields(2)
Form2.DataGrid1.Columns(3) = rs.Fields(3)
Form2.DataGrid1.Columns(4) = rs.Fields(4)
Form2.DataGrid1.Columns(5) = rs.Fields(5)
rs.Close
cn.Close
End Sub

Private Sub Command2_Click()
Form3.Visible = False
End Sub

Private Sub Command3_Click()
CommonDialog1.DialogTitle = "F:\VB_Test\image"
CommonDialog1.Filter = "图片文件 (*.*)|*.*"
CommonDialog1.ShowOpen
Text7.Text = CommonDialog1.FileName
End Sub

⌨️ 快捷键说明

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