📄 添加.frm
字号:
VERSION 5.00
Begin VB.Form 添加
Caption = "添加"
ClientHeight = 4545
ClientLeft = 3855
ClientTop = 2235
ClientWidth = 3450
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4545
ScaleWidth = 3450
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access 2000;"
DatabaseName = "D:\王琳琳\VB+Access源代码\book.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 285
Left = 1080
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "图书赔偿"
Top = 5040
Width = 1140
End
Begin VB.Frame Frame1
Caption = "信息添加"
Height = 3615
Left = 120
TabIndex = 2
Top = 120
Width = 3135
Begin VB.TextBox Text8
Height = 375
Left = 1440
TabIndex = 18
Top = 2760
Width = 1455
End
Begin VB.TextBox Text7
Height = 375
Left = 1440
TabIndex = 17
Top = 2400
Width = 1455
End
Begin VB.TextBox Text6
Height = 375
Left = 1440
TabIndex = 16
Top = 2040
Width = 1455
End
Begin VB.TextBox Text5
Height = 375
Left = 1440
TabIndex = 15
Top = 1680
Width = 1455
End
Begin VB.TextBox Text4
Height = 375
Left = 1440
TabIndex = 14
Top = 1320
Width = 1455
End
Begin VB.TextBox Text3
Height = 375
Left = 1440
TabIndex = 13
Top = 960
Width = 1455
End
Begin VB.TextBox Text2
Height = 375
Left = 1440
TabIndex = 12
Top = 600
Width = 1455
End
Begin VB.TextBox Text1
Height = 375
Left = 1440
TabIndex = 11
Top = 240
Width = 1455
End
Begin VB.Label Label8
Caption = "解决方案"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
TabIndex = 10
Top = 2880
Width = 855
End
Begin VB.Label Label7
Caption = "赔偿金额"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
TabIndex = 9
Top = 2520
Width = 855
End
Begin VB.Label Label6
Caption = "损坏程度"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
TabIndex = 8
Top = 2160
Width = 1095
End
Begin VB.Label Label5
Caption = "图书证号"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 7
Top = 1800
Width = 975
End
Begin VB.Label Label4
Caption = "姓名"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 6
Top = 1440
Width = 615
End
Begin VB.Label Label3
Caption = "类型"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
TabIndex = 5
Top = 1080
Width = 735
End
Begin VB.Label Label2
Caption = "书名"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 4
Top = 720
Width = 1095
End
Begin VB.Label Label1
Caption = "编号"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 3
Top = 360
Width = 1095
End
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 495
Left = 1920
TabIndex = 1
Top = 3840
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 495
Left = 240
TabIndex = 0
Top = 3840
Width = 1215
End
End
Attribute VB_Name = "添加"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1 = "" Or Text2 = "" Or Text3 = "" Or Text4 = "" Or Text5 = "" Or Text6 = "" Or Text7 = "" Or Text8 = "" Then
MsgBox "请输入完整数据!", 48
Text1.SetFocus
Exit Sub
End If
With Data1
.Recordset.AddNew
.Recordset("编号") = Text1
.Recordset("书名") = Text2
.Recordset("类型") = Text3
.Recordset("姓名") = Text4
.Recordset("图书证号") = Text5
.Recordset("损坏程度") = Text6
.Recordset("赔偿金额") = Text7
.Recordset("解决方案") = Text8
.Recordset.Update
End With
Text1 = "": Text2 = "": Text3 = "": Text4 = "": Text5 = "": Text6 = "": Text7 = "": Text8 = "": Text1.SetFocus
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -