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

📄 frm_alter.frm

📁 学校财务管理系统课程设计VB+SQL2
💻 FRM
字号:
VERSION 5.00
Begin VB.Form ModFixed 
   Caption         =   "修改固定资产"
   ClientHeight    =   5445
   ClientLeft      =   6975
   ClientTop       =   3360
   ClientWidth     =   6825
   LinkTopic       =   "Form1"
   ScaleHeight     =   5445
   ScaleWidth      =   6825
   Begin VB.Frame Frame2 
      Height          =   975
      Left            =   0
      TabIndex        =   14
      Top             =   4440
      Width           =   6855
      Begin VB.CommandButton Command2 
         Caption         =   "关 闭"
         Default         =   -1  'True
         Height          =   495
         Left            =   3240
         TabIndex        =   16
         Top             =   240
         Width           =   1095
      End
      Begin VB.CommandButton Command1 
         Caption         =   "修 改"
         Height          =   495
         Left            =   1920
         TabIndex        =   15
         Top             =   240
         Width           =   1095
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "固定资产添加"
      Height          =   4335
      Left            =   0
      TabIndex        =   1
      Top             =   0
      Width           =   6855
      Begin VB.TextBox txtBy 
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   2520
         TabIndex        =   7
         Top             =   1440
         Width           =   1815
      End
      Begin VB.TextBox txtMark 
         Appearance      =   0  'Flat
         Height          =   1695
         Left            =   240
         MaxLength       =   100
         TabIndex        =   6
         Top             =   2280
         Width           =   6375
      End
      Begin VB.TextBox txtMoney 
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   240
         TabIndex        =   5
         Top             =   1440
         Width           =   1815
      End
      Begin VB.TextBox txtNum 
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   4800
         TabIndex        =   4
         Top             =   600
         Width           =   1815
      End
      Begin VB.TextBox txtName 
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   2520
         TabIndex        =   3
         Top             =   600
         Width           =   1815
      End
      Begin VB.TextBox txtID 
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   240
         TabIndex        =   2
         Top             =   600
         Width           =   1815
      End
      Begin VB.Label Label9 
         Caption         =   "经手人ID"
         Height          =   255
         Left            =   2520
         TabIndex        =   13
         Top             =   1200
         Width           =   1335
      End
      Begin VB.Label Label8 
         Caption         =   "资产说明"
         Height          =   255
         Left            =   240
         TabIndex        =   12
         Top             =   2040
         Width           =   2055
      End
      Begin VB.Label Label4 
         Caption         =   "单价(元)"
         Height          =   255
         Left            =   240
         TabIndex        =   11
         Top             =   1200
         Width           =   1335
      End
      Begin VB.Label Label3 
         Caption         =   "资产数目"
         Height          =   255
         Left            =   4800
         TabIndex        =   10
         Top             =   360
         Width           =   1335
      End
      Begin VB.Label Label2 
         Caption         =   "资产名称"
         Height          =   255
         Left            =   2520
         TabIndex        =   9
         Top             =   360
         Width           =   1575
      End
      Begin VB.Label Label1 
         Caption         =   "资产编号"
         Height          =   255
         Left            =   240
         TabIndex        =   8
         Top             =   360
         Width           =   1575
      End
   End
   Begin VB.TextBox txtDate 
      Appearance      =   0  'Flat
      Height          =   270
      Left            =   4680
      TabIndex        =   0
      Top             =   1440
      Width           =   1815
   End
End
Attribute VB_Name = "ModFixed"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim strSql As String   'sql查询语句
    strSql = "update tb_zichan set zcName ='" & txtName.Text & " ',zcNum='" & txtNum.Text & " ',zcMoney='" & txtMoney.Text & "',zcBy='" & txtBy.Text & "',zcMark='" & txtMark.Text & "'where zcID = '" & txtID.Text & "'"
    'txtMark.Text = strSql
 ExecuteSql (strSql)
MsgBox "修改信息成功!", vbOKOnly
Unload Me
frm_fixList.Show

End Sub

Private Sub Command2_Click()
Me.Hide
frm_fixlistMod.Show

End Sub

Private Sub Form_Load()
Dim strSql As String   'sql查询语句
    Dim rst As New ADODB.Recordset
    Dim strID As String
    strSql = "select * from tb_zichan where zcID = '" & frm_fixlistMod.txtID.Text & "'"
    Set rst = ExecuteSql(strSql)
    If rst.EOF = True Then
    MsgBox "此条记录已经不存在,请核对后重新输入!"
    Me.Hide
    frm_fixList.Show
    Else
    txtID.Text = rst.Fields("zcID")
    txtName.Text = rst.Fields("zcName")
    txtNum.Text = rst.Fields("zcNum")
    txtMoney.Text = rst.Fields("zcMoney")
    txtMark.Text = rst.Fields("zcMark")
    txtBy.Text = rst.Fields("zcBy")
    End If
    
End Sub

⌨️ 快捷键说明

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