📄 addcdtype.frm
字号:
VERSION 5.00
Begin VB.Form AddCDType
BorderStyle = 1 'Fixed Single
Caption = "碟片类别添加"
ClientHeight = 3585
ClientLeft = 45
ClientTop = 435
ClientWidth = 2940
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3585
ScaleWidth = 2940
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command6
Caption = "关闭(&C)"
Height = 375
Left = 1560
TabIndex = 6
Top = 3000
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "添加(&A)"
Height = 375
Left = 120
TabIndex = 5
Top = 3000
Width = 1215
End
Begin VB.Frame Frame2
Caption = "碟片设置"
Height = 2775
Left = 120
TabIndex = 0
Top = 120
Width = 2655
Begin VB.TextBox Text1
Appearance = 0 'Flat
Height = 375
Index = 2
Left = 1080
TabIndex = 3
Top = 1440
Width = 1455
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
Height = 375
Index = 3
Left = 1080
TabIndex = 4
Top = 2040
Width = 1455
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
Height = 375
Index = 1
Left = 1080
TabIndex = 2
Top = 840
Width = 1455
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
Height = 375
Index = 0
Left = 1080
TabIndex = 1
Top = 240
Width = 1455
End
Begin VB.Label Label1
Caption = "碟片类别:"
Height = 255
Index = 0
Left = 120
TabIndex = 10
Top = 360
Width = 975
End
Begin VB.Label Label1
Caption = "碟片租金:"
Height = 255
Index = 1
Left = 120
TabIndex = 9
Top = 960
Width = 975
End
Begin VB.Label Label1
Caption = "可借天数:"
Height = 255
Index = 2
Left = 120
TabIndex = 8
Top = 1560
Width = 975
End
Begin VB.Label Label1
Caption = "超期罚款:"
Height = 255
Index = 3
Left = 120
TabIndex = 7
Top = 2160
Width = 1335
End
End
End
Attribute VB_Name = "AddCDType"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Dim SQL As String
Dim i As Integer
For i = 0 To 3
If Text1(i) = "" Then
MsgBox "对不起:" & Label1(i).Caption & "不能为空!", vbInformation + vbOKOnly, "警告"
Text1(i).SetFocus
Exit Sub
End If
Next
SQL = "insert into cdtype(影碟类别,影碟租金,借出天数,罚款)values(""" _
& Text1(0).Text & """," _
& Text1(1).Text & "," _
& Text1(2).Text & "," _
& Text1(3).Text & ")"
OpenDBFile
gCon.Execute SQL
CloseDBFile
MsgBox "信息添加成功!", vbInformation + vbOKOnly, "提示"
CDtype.Adodc1.Refresh
For i = 0 To 3
Text1(i).Text = ""
Next
End Sub
Private Sub Command6_Click()
Unload Me
End Sub
Private Sub Form_Load()
End Sub
Private Sub Text1_Change(Index As Integer)
For Index = 1 To 3
If Index <> 2 Then
Text1(Index).Text = Format(Text1(Index).Text, "0.00")
End If
Next
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -