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

📄 frmsrgl.frm

📁 dajia交流 一个简单的人事管理系统咯 要用的,是用以前的一个个人财务系统修改的
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Left            =   1320
         TabIndex        =   6
         Text            =   "Text1"
         Top             =   1800
         Width           =   5415
      End
      Begin VB.TextBox Text1 
         DataField       =   "收入金额"
         DataSource      =   "Adodc1"
         Height          =   375
         Index           =   3
         Left            =   4800
         TabIndex        =   5
         Text            =   "Text1"
         Top             =   960
         Width           =   1815
      End
      Begin VB.TextBox Text1 
         DataField       =   "收入类型"
         DataSource      =   "Adodc1"
         Height          =   375
         Index           =   2
         Left            =   1320
         TabIndex        =   4
         Text            =   "Text1"
         Top             =   960
         Width           =   1815
      End
      Begin VB.TextBox Text1 
         DataField       =   "收入日期"
         DataSource      =   "Adodc1"
         Height          =   375
         Index           =   1
         Left            =   4800
         TabIndex        =   3
         Text            =   "Text1"
         Top             =   240
         Width           =   1815
      End
      Begin VB.TextBox Text1 
         DataField       =   "编号"
         DataSource      =   "Adodc1"
         Height          =   375
         Index           =   0
         Left            =   1320
         TabIndex        =   2
         Text            =   "Text1"
         Top             =   240
         Width           =   1815
      End
      Begin VB.Label Label4 
         Caption         =   "支出金额:"
         Height          =   375
         Left            =   3840
         TabIndex        =   28
         Top             =   1080
         Visible         =   0   'False
         Width           =   1215
      End
      Begin VB.Label Label3 
         Caption         =   "支出类型:"
         Height          =   375
         Left            =   240
         TabIndex        =   27
         Top             =   1080
         Visible         =   0   'False
         Width           =   1095
      End
      Begin VB.Label Label2 
         Caption         =   "支出日期:"
         Height          =   255
         Left            =   3840
         TabIndex        =   26
         Top             =   360
         Visible         =   0   'False
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "xxxx-xx-xx"
         Height          =   375
         Index           =   5
         Left            =   3840
         TabIndex        =   11
         Top             =   600
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "备注:"
         Height          =   375
         Index           =   4
         Left            =   480
         TabIndex        =   10
         Top             =   2160
         Width           =   735
      End
      Begin VB.Label Label1 
         Caption         =   "收入金额:"
         Height          =   375
         Index           =   3
         Left            =   3840
         TabIndex        =   9
         Top             =   1080
         Width           =   1215
      End
      Begin VB.Label Label1 
         Caption         =   "收入类型:"
         Height          =   375
         Index           =   2
         Left            =   360
         TabIndex        =   8
         Top             =   1080
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "收入日期:"
         Height          =   375
         Index           =   1
         Left            =   3840
         TabIndex        =   7
         Top             =   360
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "编号:"
         Height          =   375
         Index           =   0
         Left            =   480
         TabIndex        =   1
         Top             =   360
         Width           =   735
      End
   End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i, j As Integer

Private Sub Command1_Click()
  Adodc1.Recordset.MoveFirst
End Sub

Private Sub Command10_Click()
  Adodc2.Recordset.MovePrevious
  If Adodc2.Recordset.BOF Then
    MsgBox "已经是第一条记录!"
    Adodc2.Recordset.MoveFirst
  End If
  
End Sub

Private Sub Command11_Click()
  Adodc2.Recordset.MoveNext
  If Adodc2.Recordset.EOF Then
    MsgBox "已经是最后一条记录!"
    Adodc2.Recordset.MoveLast
  End If
End Sub

Private Sub Command12_Click()
  Adodc2.Recordset.MoveLast
End Sub

Private Sub Command13_Click()
  If Command13.Caption = "修改" Then
    Command13.Caption = "确认"
    For j = 0 To 4
      Text2(j).Locked = False
    Next j
    Text2(0).SetFocus
  Else
    If Text2(0).Text = "" Then
      MsgBox "数据不完整,必须有编号"
    End If
    Command13.Caption = "修改"
    For j = 0 To 4
      Text2(j).Locked = False
    Next j
    Adodc2.Recordset.Update
  End If
End Sub

Private Sub Command14_Click()
  If Command14.Caption = "添加" Then
    Command14.Caption = "确认"
    Adodc2.Recordset.AddNew
    For j = 0 To 4
      Text2(j).Locked = False
    Next j
    Text2(0).SetFocus
  Else
    If Text2(0).Text = "" Then
      MsgBox "数据不完整,必须有编号"
      Text2(0).SetFocus
    End If
    Command14.Caption = "添加"
    For j = 0 To 4
      Text2(j).Locked = True
    Next j
    Text2(0).SetFocus
    Adodc2.Recordset.Update
  End If
End Sub

Private Sub Command15_Click()
  Adodc2.Recordset.Delete
  Adodc2.Refresh
  If Adodc2.Recordset.RecordCount <> 0 Then
    If Adodc2.Recordset.EOF = True Then
      Adodc2.Recordset.MoveFirst
    Else
      Adodc2.Recordset.MoveNext
    End If
  Else
    MsgBox "数据库中已经没有记录了!"
  End If
  Adodc2.Refresh

End Sub

Private Sub Command16_Click()
  Unload Form4
End Sub

Private Sub Command2_Click()
  Adodc1.Recordset.MovePrevious
  If Adodc1.Recordset.BOF Then
    MsgBox "已经是第一条记录!"
    Adodc1.Recordset.MoveFirst
  End If
End Sub

Private Sub Command3_Click()
  Adodc1.Recordset.MoveNext
  If Adodc1.Recordset.EOF Then
    MsgBox "已经是最后一条记录!"
    Adodc1.Recordset.MoveLast
  End If
End Sub

Private Sub Command4_Click()
  Adodc1.Recordset.MoveLast
End Sub

Private Sub Command5_Click()
  If Command5.Caption = "修改" Then
    Command5.Caption = "确认"
    For i = 0 To 4
      Text1(i).Locked = False
    Next i
    Text1(0).SetFocus
  Else
    If Text1(0).Text = "" Then
      MsgBox "数据不完整,必须有编号"
    End If
    Command5.Caption = "修改"
    For i = 0 To 4
      Text1(i).Locked = False
    Next i
    Adodc1.Recordset.Update
  End If
End Sub

Private Sub Command6_Click()
  If Command6.Caption = "添加" Then
    Command6.Caption = "确认"
    Adodc1.Recordset.AddNew
    For i = 0 To 4
      Text1(i).Locked = False
    Next i
    Text1(0).SetFocus
  Else
    If Text1(0).Text = "" Then
      MsgBox "数据不完整,必须有编号"
      Text1(0).SetFocus
    End If
    Command6.Caption = "添加"
    For i = 0 To 4
      Text1(i).Locked = True
    Next i
    Text1(0).SetFocus
    Adodc1.Recordset.Update
  End If
End Sub

Private Sub Command7_Click()
  Adodc1.Recordset.Delete
  Adodc1.Refresh
  If Adodc1.Recordset.RecordCount <> 0 Then
    If Adodc1.Recordset.EOF = True Then
      Adodc1.Recordset.MoveFirst
    Else
      Adodc1.Recordset.MoveNext
    End If
  Else
    MsgBox "数据库中已经没有记录了!"
  End If
  Adodc1.Refresh
End Sub

Private Sub Command8_Click()
  Unload Form4
End Sub

Private Sub Command9_Click()
  Adodc2.Recordset.MoveFirst
End Sub

Private Sub Form_Load()
  For i = 0 To 4
    Text1(i).Locked = True
  Next
  For j = 0 To 4
    Text2(j).Locked = True
  Next
End Sub

⌨️ 快捷键说明

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