📄 增加图书.frm
字号:
VERSION 5.00
Begin VB.Form form9
BackColor = &H00E0E0E0&
Caption = "Form2"
ClientHeight = 8550
ClientLeft = 60
ClientTop = 2385
ClientWidth = 8880
LinkTopic = "Form2"
ScaleHeight = 16285.71
ScaleMode = 0 'User
ScaleWidth = 8880
Begin VB.Frame Frame1
BackColor = &H00FFFFFF&
Caption = "新书人库"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0080FF80&
Height = 7215
Left = 480
TabIndex = 0
Top = 600
Width = 7695
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 5160
TabIndex = 17
Top = 5880
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 495
Left = 3600
TabIndex = 16
Top = 5880
Width = 1095
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "增加图书.frx":0000
Left = 1320
List = "增加图书.frx":0013
TabIndex = 15
Top = 5160
Width = 1455
End
Begin VB.TextBox Text6
Height = 375
Left = 1440
TabIndex = 13
Top = 4320
Width = 855
End
Begin VB.TextBox Text5
Height = 495
Left = 1200
TabIndex = 12
Top = 3480
Width = 4335
End
Begin VB.TextBox Text4
Height = 495
Left = 1200
TabIndex = 11
Top = 2880
Width = 4335
End
Begin VB.TextBox Text3
Height = 495
Left = 1200
TabIndex = 6
Top = 2160
Width = 4335
End
Begin VB.TextBox Text2
Height = 495
Left = 1200
TabIndex = 4
Top = 1320
Width = 4335
End
Begin VB.TextBox Text1
BackColor = &H00FFFFFF&
Height = 495
Left = 1200
TabIndex = 2
Top = 600
Width = 4335
End
Begin VB.Label Label8
BackColor = &H00FFFFFF&
Caption = "本"
Height = 495
Left = 2880
TabIndex = 14
Top = 4320
Width = 975
End
Begin VB.Label Label7
BackColor = &H00FFFFFF&
Caption = "类别"
Height = 375
Left = 240
TabIndex = 10
Top = 5160
Width = 975
End
Begin VB.Label Label6
BackColor = &H00FFFFFF&
Caption = "数量"
Height = 375
Left = 240
TabIndex = 9
Top = 4320
Width = 975
End
Begin VB.Label Label5
BackColor = &H00FFFFFF&
Caption = "出版社编号"
Height = 375
Left = 240
TabIndex = 8
Top = 3600
Width = 975
End
Begin VB.Label Label4
BackColor = &H00FFFFFF&
Caption = "定价"
Height = 375
Left = 240
TabIndex = 7
Top = 3000
Width = 975
End
Begin VB.Label Label3
BackColor = &H00FFFFFF&
Caption = "作者"
Height = 375
Left = 240
TabIndex = 5
Top = 2280
Width = 975
End
Begin VB.Label Label2
BackColor = &H00FFFFFF&
Caption = "书名"
Height = 375
Left = 240
TabIndex = 3
Top = 1440
Width = 975
End
Begin VB.Label Label1
BackColor = &H00FFFFFF&
Caption = "书号"
Height = 375
Left = 240
TabIndex = 1
Top = 600
Width = 975
End
End
End
Attribute VB_Name = "form9"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim note As New ADODB.Recordset
Private Sub Command1_Click()
Dim sql As String
sql = "select * from 书库表"
note.Open sql, cnn, 3, 2
note.AddNew
note.Fields("书号").Value = Text1.Text
note.Fields("书名").Value = Text2.Text
note.Fields("作者").Value = Text3.Text
note.Fields("定价").Value = Text4.Text
note.Fields("出版社编号").Value = Text5.Text
note.Fields("数量").Value = Text6.Text
note.Fields("类别").Value = Combo1.Text
note.Update
MsgBox "提交成功!"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Combo1.Text = ""
note.Close
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -