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

📄 updatesform.frm

📁 一个很不错的工资管理系统,功能全且代码简单易懂
💻 FRM
字号:
VERSION 5.00
Begin VB.Form UpdateSForm 
   Caption         =   "修改特殊项"
   ClientHeight    =   4410
   ClientLeft      =   6375
   ClientTop       =   5550
   ClientWidth     =   4110
   LinkTopic       =   "Form1"
   ScaleHeight     =   4410
   ScaleWidth      =   4110
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      Height          =   375
      Left            =   2400
      TabIndex        =   11
      Top             =   3840
      Width           =   1095
   End
   Begin VB.CommandButton cmdModify 
      Caption         =   "修改"
      Height          =   375
      Left            =   720
      TabIndex        =   10
      Top             =   3840
      Width           =   1095
   End
   Begin VB.TextBox txtValue 
      Height          =   375
      Index           =   4
      Left            =   1448
      TabIndex        =   9
      Top             =   2920
      Width           =   2415
   End
   Begin VB.TextBox txtValue 
      Height          =   375
      Index           =   3
      Left            =   1448
      TabIndex        =   7
      Top             =   2220
      Width           =   2415
   End
   Begin VB.TextBox txtValue 
      Height          =   375
      Index           =   2
      Left            =   1448
      TabIndex        =   5
      Top             =   1520
      Width           =   2415
   End
   Begin VB.TextBox txtValue 
      Height          =   375
      Index           =   1
      Left            =   1448
      TabIndex        =   3
      Top             =   820
      Width           =   2415
   End
   Begin VB.TextBox txtValue 
      Height          =   375
      Index           =   0
      Left            =   1448
      TabIndex        =   1
      Top             =   120
      Width           =   2415
   End
   Begin VB.Label lblField 
      Caption         =   "lblField"
      Height          =   375
      Index           =   4
      Left            =   248
      TabIndex        =   8
      Top             =   2960
      Width           =   855
   End
   Begin VB.Label lblField 
      Caption         =   "lblField"
      Height          =   375
      Index           =   3
      Left            =   248
      TabIndex        =   6
      Top             =   2280
      Width           =   855
   End
   Begin VB.Label lblField 
      Caption         =   "lblField"
      Height          =   375
      Index           =   2
      Left            =   248
      TabIndex        =   4
      Top             =   1600
      Width           =   855
   End
   Begin VB.Label lblField 
      Caption         =   "lblField"
      Height          =   375
      Index           =   1
      Left            =   248
      TabIndex        =   2
      Top             =   920
      Width           =   855
   End
   Begin VB.Label lblField 
      Caption         =   "lblField"
      Height          =   375
      Index           =   0
      Left            =   248
      TabIndex        =   0
      Top             =   240
      Width           =   855
   End
End
Attribute VB_Name = "UpdateSForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
 Unload Me
End Sub

Private Sub cmdModify_Click()
   '打开错误处理陷阱
   Dim intErrFileNo As Integer  '自由文件号
   On Error GoTo ErrGoto
   '----------------------------------------------------
    SQL = "UPDATE 特殊项 SET 特殊项ID =" & txtValue(0).Text & _
        " ,职工ID = """ & txtValue(1).Text & _
        """ ,特殊项名称 = """ & txtValue(2).Text & _
        """ ,特殊项金额 = " & txtValue(3).Text & _
        " ,特殊项日期 = #" & txtValue(4).Text & _
        "# WHERE 特殊项ID =, """ & txtValue(0).Text & """"
    OpenDBFile
    gCon.Execute SQL
    CloseDBFile
    Me.Hide
    SpecialForm.Adodc1.Refresh
   '----------------------------------------------------
   Exit Sub
   '-----------------------------
ErrGoto:
   '把错误信息保存在文件里
   intErrFileNo = FreeFile()
   Open "YFSystem.ini" For Append As intErrFileNo
     Print #intErrFileNo, Chr(34) + Format(Now, "YYYY-MM-DD HH:MM:SS") + Chr(34), Chr(34) + "信息" + Chr(34), Chr(34) + Err.Description + Chr(34), Chr(34) + "Command1_Click(AddEForm)" + Chr(34), Chr(34) + App.Title + Chr(34)
     Print #intErrFileNo, Err.Description
   Close #intErrFileNo
   Me.Hide

End Sub

Private Sub Form_activate()

lblField(0).Caption = "特殊项ID"
lblField(1).Caption = "职工ID"
lblField(2).Caption = "特殊项名称"
lblField(3).Caption = "特殊项金额"
lblField(4).Caption = "特殊项日期"

For i = 0 To 4
        SpecialForm.DataGrid1.Col = i
        txtValue(i) = SpecialForm.DataGrid1.Text
Next
txtValue(0).Locked = True
End Sub

⌨️ 快捷键说明

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