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

📄 frmygglxg.frm

📁 很好用的通用库存管理程序
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmYGGLXG 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "员工档案修改"
   ClientHeight    =   4035
   ClientLeft      =   5160
   ClientTop       =   2775
   ClientWidth     =   3345
   ControlBox      =   0   'False
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   4035
   ScaleWidth      =   3345
   Begin VB.TextBox TxtName 
      Appearance      =   0  'Flat
      ForeColor       =   &H00FF8080&
      Height          =   270
      Left            =   1080
      TabIndex        =   0
      Top             =   120
      Width           =   1935
   End
   Begin VB.TextBox TxtDZ 
      Appearance      =   0  'Flat
      ForeColor       =   &H00FF8080&
      Height          =   735
      Left            =   1080
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   3
      Top             =   1560
      Width           =   2175
   End
   Begin VB.TextBox TxtZW 
      Appearance      =   0  'Flat
      ForeColor       =   &H00FF8080&
      Height          =   270
      Left            =   1080
      TabIndex        =   1
      Top             =   600
      Width           =   1935
   End
   Begin VB.TextBox TxtTele 
      Appearance      =   0  'Flat
      ForeColor       =   &H00FF8080&
      Height          =   270
      Left            =   1080
      TabIndex        =   2
      Top             =   1080
      Width           =   1935
   End
   Begin VB.TextBox TxtBZ 
      Appearance      =   0  'Flat
      ForeColor       =   &H00FF8080&
      Height          =   735
      Left            =   1080
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   4
      Top             =   2520
      Width           =   2175
   End
   Begin VB.CommandButton Command1 
      Caption         =   "保 存"
      Height          =   375
      Left            =   720
      TabIndex        =   5
      Top             =   3480
      Width           =   855
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取 消"
      Height          =   375
      Left            =   1920
      TabIndex        =   6
      Top             =   3480
      Width           =   855
   End
   Begin VB.Label Label11 
      Caption         =   "员工姓名:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   120
      TabIndex        =   11
      Top             =   120
      Width           =   975
   End
   Begin VB.Label Label12 
      Caption         =   "员工地址:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   120
      TabIndex        =   10
      Top             =   1800
      Width           =   975
   End
   Begin VB.Label Label13 
      Caption         =   "电话:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   240
      TabIndex        =   9
      Top             =   1080
      Width           =   615
   End
   Begin VB.Label Label14 
      Caption         =   "员工职务:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   120
      TabIndex        =   8
      Top             =   600
      Width           =   1095
   End
   Begin VB.Label Label18 
      Caption         =   "备注:"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   240
      TabIndex        =   7
      Top             =   2760
      Width           =   615
   End
End
Attribute VB_Name = "FrmYGGLXG"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    If TxtName.Text = "" Then
      MsgBox "请填写员工姓名!"
      Exit Sub
    End If
    If TxtZW.Text = "" Then
      MsgBox "请填写员工职务!"
      Exit Sub
    End If
    If TxtTele.Text = "" Then
      MsgBox "请填写员工电话!"
      Exit Sub
    End If
    If TxtDZ.Text = "" Then
      MsgBox "请填写员工地址!"
      Exit Sub
    End If
   Make_Save
   FrmYGGL.Show
   Unload Me
End Sub
Private Sub Make_Save()
    sSql = "SELECT * FROM 员工表 where ID =" & RemId
     Rs.Open sSql, db, adOpenKeyset, adLockOptimistic, adCmdText
   Rs!姓名 = TxtName.Text
   Rs!职务 = TxtZW.Text
   Rs!电话 = TxtTele.Text
   Rs!地址 = TxtDZ.Text
   Rs!密码 = "8888"
   If TxtBZ.Text = "" Then Rs!备注 = "-" Else Rs!备注 = TxtBZ.Text
   Rs.Update
   Rs.Close
End Sub
Private Sub Command2_Click()
   FrmYGGL.Show
   Unload Me
End Sub
Private Sub Form_Load()
Me.Top = MDIFrmMain.Height / 2 - Me.Height / 2 - 1000
Me.Left = MDIFrmMain.Width / 2 - Me.Width / 2
Set Rs = New Recordset
Set_Int
End Sub
Private Sub Set_Int()
Dim i As Integer
 On Error GoTo DataErr
    sSql = "SELECT * FROM 员工表 where ID =" & RemId
 Rs.Open sSql, db, adOpenKeyset, adLockOptimistic, adCmdText
 TxtName.Text = Rs.Fields("姓名")
 TxtZW.Text = Rs.Fields("职务")
 TxtTele.Text = Rs.Fields("电话")
 TxtDZ.Text = Rs.Fields("地址")
 If Rs.Fields("备注") = "-" Then TxtBZ.Text = "" Else TxtBZ.Text = Rs.Fields("备注")

Rs.Close

  Exit Sub
DataErr:
     MsgBox Err.Description
End Sub


⌨️ 快捷键说明

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