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

📄 frm资产信息表.frm

📁 企业资产管理信息系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Width           =   1815
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "原始信息"
      Height          =   1935
      Left            =   120
      TabIndex        =   2
      Top             =   120
      Width           =   10095
      Begin VB.TextBox txtFields 
         DataField       =   "购买价格"
         DataSource      =   "datPrimaryRS"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   360
         Index           =   6
         Left            =   6120
         TabIndex        =   15
         Top             =   1320
         Width           =   3735
      End
      Begin VB.TextBox txtFields 
         DataField       =   "购买日期"
         DataSource      =   "datPrimaryRS"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   360
         Index           =   5
         Left            =   1680
         TabIndex        =   13
         Top             =   1365
         Width           =   3015
      End
      Begin VB.TextBox txtFields 
         DataField       =   "生产单位"
         DataSource      =   "datPrimaryRS"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   360
         Index           =   4
         Left            =   4680
         TabIndex        =   11
         Top             =   795
         Width           =   5175
      End
      Begin VB.TextBox txtFields 
         DataField       =   "资产型号"
         DataSource      =   "datPrimaryRS"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   360
         Index           =   3
         Left            =   1680
         TabIndex        =   9
         Top             =   840
         Width           =   1575
      End
      Begin VB.TextBox txtFields 
         DataField       =   "资产名称"
         DataSource      =   "datPrimaryRS"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   360
         Index           =   2
         Left            =   7800
         TabIndex        =   7
         Top             =   360
         Width           =   2055
      End
      Begin VB.TextBox txtFields 
         DataField       =   "资产分类"
         DataSource      =   "datPrimaryRS"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   360
         Index           =   1
         Left            =   4680
         TabIndex        =   5
         Top             =   315
         Width           =   1695
      End
      Begin VB.TextBox txtFields 
         DataField       =   "资产编号"
         DataSource      =   "datPrimaryRS"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   360
         Index           =   0
         Left            =   1680
         TabIndex        =   1
         Top             =   360
         Width           =   1575
      End
      Begin VB.Label lblLabels 
         Caption         =   "购买价格:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   6
         Left            =   4920
         TabIndex        =   14
         Top             =   1320
         Width           =   1815
      End
      Begin VB.Label lblLabels 
         Caption         =   "购买日期:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   5
         Left            =   480
         TabIndex        =   12
         Top             =   1365
         Width           =   1815
      End
      Begin VB.Label lblLabels 
         Caption         =   "生产单位:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   4
         Left            =   3480
         TabIndex        =   10
         Top             =   795
         Width           =   1815
      End
      Begin VB.Label lblLabels 
         Caption         =   "资产型号:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   3
         Left            =   480
         TabIndex        =   8
         Top             =   840
         Width           =   1815
      End
      Begin VB.Label lblLabels 
         Caption         =   "资产名称:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   2
         Left            =   6600
         TabIndex        =   6
         Top             =   285
         Width           =   1815
      End
      Begin VB.Label lblLabels 
         Caption         =   "资产分类:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   1
         Left            =   3480
         TabIndex        =   4
         Top             =   315
         Width           =   1815
      End
      Begin VB.Label lblLabels 
         Caption         =   "资产编号:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   0
         Left            =   480
         TabIndex        =   3
         Top             =   360
         Width           =   1815
      End
   End
   Begin VB.PictureBox picButtons 
      Appearance      =   0  'Flat
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   1140
      Left            =   10440
      ScaleHeight     =   1140
      ScaleWidth      =   1200
      TabIndex        =   0
      Top             =   480
      Width           =   1200
      Begin VB.CommandButton Command4 
         Caption         =   "取消"
         Height          =   495
         Left            =   0
         TabIndex        =   36
         Top             =   600
         Width           =   1095
      End
   End
   Begin MSAdodcLib.Adodc datPrimaryRS 
      Align           =   2  'Align Bottom
      Height          =   330
      Left            =   0
      Top             =   5805
      Width           =   8160
      _ExtentX        =   14393
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   " "
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
End
Attribute VB_Name = "frmEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Command1_Click() '删除记录
 On Error GoTo DelErr
 Dim msg As String
 
msg = MsgBox("删除记录吗?", vbInformation + vbOKCancel, "删除记录")
If msg = "1" Then '确定
  With Adodc1.Recordset
    .Delete '删除记录
    .MoveNext
    If .EOF Then .MoveLast
  End With
Else
    Exit Sub
End If
Exit Sub

DelErr:
  MsgBox Err.Description
  
End Sub

Private Sub Command2_Click() '保存记录
    On Error GoTo UpdateErr

Dim msg As String
 
msg = MsgBox("保存记录修改吗?", vbInformation + vbOKCancel, "保存记录") '保存记录
If msg = "1" Then '确定
  datPrimaryRS.Recordset.UpdateBatch adAffectAll '保存记录
Else
    Exit Sub
End If
Exit Sub

UpdateErr:
  MsgBox Err.Description

End Sub

Private Sub Command3_Click() '增加附件

Load frmAddFJ
frmAddFJ.txtFields(0).Text = Me.txtFields(0).Text '自动输入"资产编号"
frmAddFJ.Show

End Sub

Private Sub Command4_Click()
Unload Me '卸载窗体
End Sub

Private Sub Command5_Click()
Adodc1.Refresh '刷新数据
End Sub

Private Sub Form_Load()

'设定数据源
datPrimaryRS.ConnectionString = constr
datPrimaryRS.RecordSource = "select 资产编号,资产分类,资产名称,资产型号,生产单位,购买日期,购买价格,使用部门,负责人,使用状况,使用年限,注销日期,备注,注销 from 资产信息表"
datPrimaryRS.Refresh
End Sub

Private Sub Form_Unload(Cancel As Integer)
  Screen.MousePointer = vbDefault
End Sub

Private Sub datPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
  '为这个 recordset 显示当前记录位置
On Error Resume Next

  datPrimaryRS.Caption = "设备编号: " & CStr(datPrimaryRS.Recordset.Fields(0))

'移动记录后,相应更新附件数据
Adodc1.ConnectionString = constr
Adodc1.RecordSource = "select 资产编号,附件编号,附件类型,附件名称,附件型号,附件价格,使用状态 from 附件信息表 where 资产编号 like " & Trim(datPrimaryRS.Recordset.Fields(0)) & " Order by 附件编号"
Adodc1.Refresh

End Sub

⌨️ 快捷键说明

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