📄 form7.frm
字号:
VERSION 5.00
Begin VB.Form Form7
Caption = "Form7"
ClientHeight = 10860
ClientLeft = 60
ClientTop = 345
ClientWidth = 7920
LinkTopic = "Form7"
ScaleHeight = 10860
ScaleWidth = 7920
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command3
Caption = "清空"
Height = 495
Left = 5400
TabIndex = 35
Top = 9720
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 3120
TabIndex = 34
Top = 9720
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "提交"
Height = 495
Left = 1080
TabIndex = 32
Top = 9720
Width = 1215
End
Begin VB.TextBox Text16
Height = 495
Left = 5760
TabIndex = 15
Top = 8520
Width = 1215
End
Begin VB.TextBox Text15
Height = 495
Left = 1560
TabIndex = 14
Top = 8520
Width = 1215
End
Begin VB.TextBox Text14
Height = 495
Left = 5760
TabIndex = 13
Top = 7560
Width = 1215
End
Begin VB.TextBox Text13
Height = 495
Left = 1560
TabIndex = 12
Text = "买进"
Top = 7800
Width = 1215
End
Begin VB.TextBox Text12
Height = 495
Left = 5760
TabIndex = 11
Top = 6720
Width = 1215
End
Begin VB.TextBox Text11
Height = 495
Left = 1560
TabIndex = 10
Top = 6840
Width = 1215
End
Begin VB.TextBox Text10
Height = 495
Left = 5760
TabIndex = 9
Top = 5520
Width = 1215
End
Begin VB.TextBox Text9
Height = 495
Left = 1560
TabIndex = 8
Top = 5640
Width = 1215
End
Begin VB.TextBox Text8
Height = 495
Left = 5640
TabIndex = 7
Top = 4560
Width = 1215
End
Begin VB.TextBox Text7
Height = 495
Left = 1560
TabIndex = 6
Top = 4680
Width = 1215
End
Begin VB.TextBox Text6
Height = 495
Left = 5640
TabIndex = 5
Top = 3480
Width = 1215
End
Begin VB.TextBox Text5
Height = 495
Left = 1560
TabIndex = 4
Top = 3600
Width = 1215
End
Begin VB.TextBox Text4
Height = 495
Left = 5640
TabIndex = 3
Top = 2400
Width = 1695
End
Begin VB.TextBox Text3
Height = 495
Left = 1560
TabIndex = 2
Top = 2400
Width = 1455
End
Begin VB.TextBox Text2
Height = 495
Left = 5640
TabIndex = 1
Top = 1200
Width = 1695
End
Begin VB.TextBox Text1
Height = 495
Left = 1560
TabIndex = 0
Top = 1200
Width = 1575
End
Begin VB.Label Label17
Caption = "请填写买进的资产信息"
Height = 735
Left = 2640
TabIndex = 33
Top = 240
Width = 3255
End
Begin VB.Label Label16
Caption = "现有价值"
Height = 495
Left = 4320
TabIndex = 31
Top = 8760
Width = 1215
End
Begin VB.Label Label15
Caption = "是否开始折旧"
Height = 495
Left = 240
TabIndex = 30
Top = 8640
Width = 1215
End
Begin VB.Label Label14
Caption = "提交日期"
Height = 495
Left = 4200
TabIndex = 29
Top = 7800
Width = 1215
End
Begin VB.Label Label13
Caption = "使用情况"
Height = 495
Left = 240
TabIndex = 28
Top = 7800
Width = 1215
End
Begin VB.Label Label12
Caption = "负责人员"
Height = 495
Left = 4200
TabIndex = 27
Top = 6840
Width = 1215
End
Begin VB.Label Label11
Caption = "部门编号"
Height = 495
Left = 240
TabIndex = 26
Top = 6840
Width = 1215
End
Begin VB.Label Label10
Caption = "净残值率"
Height = 495
Left = 4200
TabIndex = 25
Top = 5520
Width = 1215
End
Begin VB.Label Label9
Caption = "原值"
Height = 495
Left = 240
TabIndex = 24
Top = 5640
Width = 1215
End
Begin VB.Label Label8
Caption = "使用年限"
Height = 495
Left = 4200
TabIndex = 23
Top = 4560
Width = 1215
End
Begin VB.Label Label7
Caption = "入账日期"
Height = 495
Left = 120
TabIndex = 22
Top = 4800
Width = 1215
End
Begin VB.Label Label6
Caption = "生产厂家"
Height = 495
Left = 4320
TabIndex = 21
Top = 3480
Width = 1215
End
Begin VB.Label Label5
Caption = "型号"
Height = 495
Left = 240
TabIndex = 20
Top = 3600
Width = 1215
End
Begin VB.Label Label4
Caption = "资产类型编号"
Height = 495
Left = 4440
TabIndex = 19
Top = 2520
Width = 1215
End
Begin VB.Label Label3
Caption = "资产名称"
Height = 495
Left = 240
TabIndex = 18
Top = 2520
Width = 1215
End
Begin VB.Label Label2
Caption = "资产编号"
Height = 495
Left = 4320
TabIndex = 17
Top = 1200
Width = 1215
End
Begin VB.Label Label1
Caption = "记录编号"
Height = 495
Left = 240
TabIndex = 16
Top = 1200
Width = 1215
End
End
Attribute VB_Name = "Form7"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim t1, t2, t3, t4, t5, t6, t7, t10, t11, t12, t13, t14, t8, t9, t15, t16 As String
'Dim 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 = CStr(Text3.Text)
t4 = CStr(Text4.Text)
t5 = CStr(Text5.Text)
t6 = CStr(Text6.Text)
t7 = CStr(Text7.Text)
t8 = CStr(Text8.Text)
t9 = CStr(Text9.Text)
t10 = CStr(Text10.Text)
t11 = CStr(Text11.Text)
t12 = CStr(Text12.Text)
t13 = CStr(Text13.Text)
t14 = CStr(Text14.Text)
t15 = CStr(Text15.Text)
t16 = CStr(Text16.Text)
strSQL = "insert into Assets(Id,Aid,Aname,TypeId,Model,Producer,UseDate,UseYear,OrgPrice,Ratio,DeptId,RepPerson,Status,PostDate,IsDiscount,curvalue) values('" & t1 & "','" & t2 & "','" & t3 & "','" & t4 & "','" & t5 & "','" & t6 & "', '" & t7 & "' ,'" & t8 & "','" & t9 & "','" & t10 & "' ,'" & t11 & "','" & t12 & "','" & t13 & "','" & t14 & "','" & t15 & "','" & t16 & "')"
MsgBox strSQL
conn.Execute (strSQL)
MsgBox "提交成功!!!"
conn.Close
'End If
'End If
'End If
'End If
End Sub
Private Sub Command2_Click()
Unload Me
Load Form3
Form3.Show
End Sub
Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = ""
Text16.Text = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -