📄 editcdt.frm
字号:
VERSION 5.00
Begin VB.Form EditCDt
BorderStyle = 1 'Fixed Single
Caption = "类别修改"
ClientHeight = 3495
ClientLeft = 45
ClientTop = 435
ClientWidth = 2955
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3495
ScaleWidth = 2955
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame2
Caption = "碟片设置"
Height = 2775
Left = 120
TabIndex = 2
Top = 120
Width = 2655
Begin VB.TextBox Text1
Appearance = 0 'Flat
Height = 375
Index = 0
Left = 1080
TabIndex = 6
Top = 240
Width = 1455
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
Height = 375
Index = 1
Left = 1080
TabIndex = 5
Top = 840
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 = 2
Left = 1080
TabIndex = 3
Top = 1440
Width = 1455
End
Begin VB.Label Label1
Caption = "超期罚款:"
Height = 255
Index = 3
Left = 120
TabIndex = 10
Top = 2160
Width = 1335
End
Begin VB.Label Label1
Caption = "可借天数:"
Height = 255
Index = 2
Left = 120
TabIndex = 9
Top = 1560
Width = 975
End
Begin VB.Label Label1
Caption = "碟片租金:"
Height = 255
Index = 1
Left = 120
TabIndex = 8
Top = 960
Width = 975
End
Begin VB.Label Label1
Caption = "碟片类别:"
Height = 255
Index = 0
Left = 120
TabIndex = 7
Top = 360
Width = 975
End
End
Begin VB.CommandButton Command1
Caption = "修改(&E)"
Height = 375
Left = 120
TabIndex = 1
Top = 3000
Width = 1215
End
Begin VB.CommandButton Command6
Caption = "关闭(&C)"
Height = 375
Left = 1560
TabIndex = 0
Top = 3000
Width = 1215
End
End
Attribute VB_Name = "EditCDt"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim TmpL As String
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 = "update cdtype set 影碟类别 = """ & Text1(0).Text & """,影碟租金=" & Text1(1).Text & ", 借出天数=" & Text1(2).Text & ", 罚款= " & Text1(3).Text & " where 类别编号=" & TmpL & ""
OpenDBFile
gCon.Execute SQL
CloseDBFile
CDtype.Adodc1.Refresh
MsgBox "数据修改成功请返回!", vbInformation + vbOKOnly, "提示"
Unload Me
End Sub
Private Sub Command6_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim i As Integer
For i = 0 To 3
CDtype.DataGrid1.Col = i + 1
Text1(i).Text = CDtype.DataGrid1.Text
Next
CDtype.DataGrid1.Col = 0
TmpL = CDtype.DataGrid1.Text
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 + -