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

📄 frm月库生成.frm

📁 access+vb工资管理系统。没有文档。 功能较全面。工资表的修改
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frm月库生成 
   Caption         =   "月库生成"
   ClientHeight    =   1860
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4005
   LinkTopic       =   "Form1"
   ScaleHeight     =   1860
   ScaleWidth      =   4005
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton Command2 
      Cancel          =   -1  'True
      Caption         =   "放弃(&Q)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   405
      Left            =   2280
      TabIndex        =   6
      Top             =   1230
      Width           =   1185
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定(&E)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   405
      Left            =   630
      TabIndex        =   5
      Top             =   1230
      Width           =   1185
   End
   Begin VB.TextBox mathtext 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   3060
      MaxLength       =   2
      TabIndex        =   4
      Top             =   630
      Width           =   555
   End
   Begin VB.TextBox yeartext 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   1560
      MaxLength       =   4
      TabIndex        =   2
      Top             =   630
      Width           =   825
   End
   Begin VB.Label Label3 
      Caption         =   "月:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   2490
      TabIndex        =   3
      Top             =   630
      Width           =   465
   End
   Begin VB.Label Label2 
      Caption         =   "年:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   1020
      TabIndex        =   1
      Top             =   630
      Width           =   465
   End
   Begin VB.Label Label1 
      Caption         =   "需要生成工资的年月:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   345
      Left            =   90
      TabIndex        =   0
      Top             =   90
      Width           =   2505
   End
End
Attribute VB_Name = "frm月库生成"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
     If Len(Trim(yeartext.Text)) <> 4 Then
        hxfyn = MsgBox("年份不是四位数错误,请重输!", 48)
     Else
        If Val(yeartext.Text) < 1998 Or Val(yeartext.Text) > Year(Date) Then
           hxfyn = MsgBox("年份输入错误,输入值应大于等于1998小于系统年份,请重输!", 48)
        Else
           hxfyear = Trim(yeartext.Text)
           If Len(Trim(mathtext.Text)) <> 2 Then
              hxfyn = MsgBox("月份不是二位数错误,请重输!", 48)
           Else
              If Val(mathtext.Text) < 1 Or Val(mathtext.Text) > 12 Then
                 hxfyn = MsgBox("月份值在01-12之间,请重输!", 48)
              Else
                 hxfmath = Trim(mathtext.Text)
                 Set wdb = wws.OpenDatabase(xtlj + "dwxx.mdb")
                 Set wtb1 = wdb.OpenRecordset("月库登记", dbOpenTable)
                 wtb1.Index = "年月"
                 wtb1.Seek "=", hxfyear, hxfmath
                 If wtb1.NoMatch Then
                    wtb1.AddNew
                    wtb1("年") = hxfyear
                    wtb1("月") = hxfmath
                    wtb1.Update
                    dqklj = xtlj & "data\" & hxfyear & hxfmath & ".mdb"
                    FileCopy xtlj & "bzxx.mdb", dqklj
                    frmMAIN.StatusBar1.Panels(1).Text = "  注意:现在打开和处理的是" & hxfyear & "年" & hxfmath & "月的工资库"
                    hxfdbdk = True
                 Else
                    hxfyn = MsgBox(hxfyear & "年" & "月的工资库已经存在,是否打开?", 36)
                    If hxfyn = vbYes Then
                       frmMAIN.StatusBar1.Panels(1).Text = "  注意:现在打开和处理的是" & hxfyear & "年" & hxfmath & "月的工资库!"
                       dqklj = xtlj & "data\" & hxfyear & hxfmath & ".mdb"
                       hxfdbdk = True
                    Else
                       frmMAIN.StatusBar1.Panels(1).Text = "****未打开工资库!****"
                    End If
                 End If
                 Unload Me
              End If
           End If
        End If
     End If
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

⌨️ 快捷键说明

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