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

📄 form6.frm

📁 该报告及程序实现的功能: 初始条件: 一个公司希望为管理它的每批资产(如PC机、打印机、汽车、桌子、椅子等)建立一个数据库。资产被分为几类
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form6 
   Caption         =   "Form6"
   ClientHeight    =   9780
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   7410
   LinkTopic       =   "Form6"
   ScaleHeight     =   9780
   ScaleWidth      =   7410
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox Text9 
      Height          =   495
      Left            =   2880
      TabIndex        =   14
      Top             =   7080
      Width           =   2655
   End
   Begin VB.TextBox Text8 
      Height          =   495
      Left            =   2880
      TabIndex        =   13
      Top             =   6120
      Width           =   2655
   End
   Begin VB.TextBox Text6 
      Height          =   495
      Left            =   2880
      TabIndex        =   12
      Top             =   4440
      Width           =   2655
   End
   Begin VB.TextBox Text5 
      Height          =   495
      Left            =   2880
      TabIndex        =   11
      Top             =   3600
      Width           =   2655
   End
   Begin VB.TextBox Text4 
      Height          =   495
      Left            =   2880
      TabIndex        =   10
      Top             =   2760
      Width           =   2655
   End
   Begin VB.CommandButton Command2 
      Caption         =   "返回"
      Height          =   495
      Left            =   4200
      TabIndex        =   9
      Top             =   8760
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "提交"
      Height          =   495
      Left            =   1320
      TabIndex        =   8
      Top             =   8760
      Width           =   1215
   End
   Begin VB.TextBox Text7 
      Height          =   495
      Left            =   2880
      TabIndex        =   7
      Top             =   5160
      Width           =   2655
   End
   Begin VB.TextBox Text3 
      Height          =   495
      Left            =   2880
      TabIndex        =   6
      Top             =   1920
      Width           =   2655
   End
   Begin VB.TextBox Text2 
      Height          =   495
      Left            =   3000
      TabIndex        =   5
      Top             =   1080
      Width           =   2535
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   3000
      TabIndex        =   4
      Top             =   360
      Width           =   2535
   End
   Begin VB.Label Label9 
      Caption         =   "提交日期"
      Height          =   495
      Left            =   720
      TabIndex        =   19
      Top             =   7200
      Width           =   1215
   End
   Begin VB.Label Label8 
      Caption         =   "结果"
      Height          =   495
      Left            =   720
      TabIndex        =   18
      Top             =   6000
      Width           =   1215
   End
   Begin VB.Label Label7 
      Caption         =   "状态"
      Height          =   495
      Left            =   720
      TabIndex        =   17
      Top             =   4440
      Width           =   1215
   End
   Begin VB.Label Label6 
      Caption         =   "维修原因"
      Height          =   495
      Left            =   720
      TabIndex        =   16
      Top             =   3600
      Width           =   1215
   End
   Begin VB.Label Label5 
      Caption         =   "维修单位"
      Height          =   495
      Left            =   720
      TabIndex        =   15
      Top             =   2880
      Width           =   1215
   End
   Begin VB.Label Label4 
      Caption         =   "维修资产编号:"
      Height          =   495
      Left            =   720
      TabIndex        =   3
      Top             =   1080
      Width           =   1575
   End
   Begin VB.Label Label3 
      Caption         =   "维修费用:"
      Height          =   495
      Left            =   720
      TabIndex        =   2
      Top             =   5280
      Width           =   1335
   End
   Begin VB.Label Label2 
      Caption         =   "维修时间:"
      Height          =   495
      Left            =   720
      TabIndex        =   1
      Top             =   1920
      Width           =   1455
   End
   Begin VB.Label Label1 
      Caption         =   "请输入要维修的编号:"
      Height          =   375
      Left            =   720
      TabIndex        =   0
      Top             =   480
      Width           =   1815
   End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim t1, t2, t3, t5, t6, t4, t8, t9 As String
Dim t7 As Integer
Dim conn As New ADODB.Connection
Dim strSQL As String
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & App.Path & "\Assets.mdb"
conn.Open


If Text1.Text = "" Then
  MsgBox "编号不能够为空!!"
Else
 If Text2.Text = "" Then
   MsgBox "资产编号不能够为空!!"
 Else
If Text3.Text = "" Then
  MsgBox "日期不能够为空!!"
Else
 If Text4.Text = "" Then
   MsgBox "费用不能够为空!!"
 Else
   t1 = CStr(Text1.Text)
   t2 = CStr(Text2.Text)
   t3 = CDate(Text3.Text)
   t4 = CStr(Text4.Text)
   t5 = CStr(Text5.Text)
   t6 = CStr(Text6.Text)
   t7 = CInt(Text7.Text)
   t8 = CStr(Text8.Text)
   t9 = CDate(Text9.Text)
  strSQL = "insert into Repair(Id,Aid,RepairDate,Unit,Reason,Status,Total,Result,PostDate) values('" & t1 & "','" & t2 & "','" & t3 & "','" & t4 & "','" & t5 & "','" & t6 & "', '" & t7 & "' ,'" & t8 & "','" & t9 & "')"
  MsgBox strSQL
  conn.Execute (strSQL)
  MsgBox "提交成功!!!"
  conn.Close
End If
End If
End If
End If
End Sub

Private Sub Command2_Click()
Me.Hide
Form3.Show
End Sub

⌨️ 快捷键说明

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