📄 rentpayin.frm
字号:
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2160
TabIndex = 6
Text = "Text3"
Top = 1680
Width = 1575
End
Begin VB.TextBox Text2
DataField = "电影名"
DataSource = "Adodc1"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2160
TabIndex = 4
Text = "Text2"
Top = 1080
Width = 1575
End
Begin VB.TextBox Text1
DataField = "盘号"
DataSource = "Adodc1"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2160
TabIndex = 2
Text = "Text1"
Top = 480
Width = 1575
End
Begin VB.Label Label6
Caption = "入库时间"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5400
TabIndex = 9
Top = 1680
Width = 1215
End
Begin VB.Label Label5
Caption = "语种"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5880
TabIndex = 8
Top = 1080
Width = 615
End
Begin VB.Label Label4
Caption = "类型"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5880
TabIndex = 7
Top = 480
Width = 975
End
Begin VB.Label Label3
Caption = "主演"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1080
TabIndex = 5
Top = 1680
Width = 735
End
Begin VB.Label Label2
Caption = "电影名"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 840
TabIndex = 3
Top = 1080
Width = 855
End
Begin VB.Label Label1
Caption = "盘号"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1080
TabIndex = 1
Top = 480
Width = 855
End
End
Begin VB.Label Label7
Caption = "内容简介:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 840
TabIndex = 17
Top = 3230
Width = 1215
End
End
Attribute VB_Name = "rentpayin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim bool As Boolean
Private Sub Combo1_Click()
If Combo1.Text <> "" Then
Adodc1.Recordset("类型") = Combo1.Text
End If
End Sub
Private Sub Combo2_Click()
If Combo2.Text <> "" Then
Adodc1.Recordset("语种") = Combo2.Text
Text6.SetFocus
End If
End Sub
Private Sub Command1_Click()
If bool = True Then
Dim i As Long
If Adodc1.Recordset.RecordCount <> 0 Then
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from 出租管理 order by 盘号"
Adodc1.Refresh
Adodc1.Recordset.MoveLast
i = Val(Adodc1.Recordset("盘号"))
i = i + 1
Else
Adodc1.Recordset("盘号") = 1001
End If
bool = False
Adodc1.Recordset.AddNew
Adodc1.Recordset("盘号") = str(i)
Adodc1.Recordset("入库时间") = DTPicker1.Value
Text2.SetFocus
End If
End Sub
Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "增加一条影碟入库数据"
End Sub
Private Sub Command2_Click()
On Error GoTo errmsg
Dim str As Integer
str = MsgBox("确定是否删除", 33, "删除一个记录")
If str = 1 Then
bool = True
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast
Else
Adodc1.Recordset.CancelUpdate
End If
Exit Sub
errmsg:
MsgBox Err.Description, vbExclamation, "入库数据"
End Sub
Private Sub Command2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "删除一条影碟入库数据"
End Sub
Private Sub Command3_Click()
On Error GoTo errmsg
Adodc1.Recordset.Update
bool = True
Exit Sub
errmsg:
MsgBox Err.Description, vbExclamation, "入库数据-update"
End Sub
Private Sub Command3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "更新影碟入库数据"
End Sub
Private Sub Command4_Click()
On Error GoTo errmsg
Adodc1.Recordset.CancelUpdate
Exit Sub
errmsg:
MsgBox Err.Description, vbExclamation, "入库数据-cancelupdate"
End Sub
Private Sub Command4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "澈消当前操作"
End Sub
Private Sub Command5_Click()
On Error GoTo errmsg
Dim str As Integer
str = MsgBox("真的要清空所有记录吗", 33, "清空记录")
If str = 1 Then
Adodc1.Recordset.MoveFirst
While Not Adodc1.Recordset.EOF
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext
Wend
Else
Adodc1.Recordset.CancelUpdate
Adodc1.Recordset.MoveLast
End If
Exit Sub
errmsg: MsgBox Err.Description, vbExclamation, "入库错误"
End Sub
Private Sub Command5_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "清空库存中的所有影碟数据"
End Sub
Private Sub Command6_Click()
rentpayinprint.Show
End Sub
Private Sub Command6_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "打印库存影碟数据"
End Sub
Private Sub DataGrid1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "出租影碟库存数据"
End Sub
Private Sub DTPicker1_CallbackKeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer, ByVal CallbackField As String, CallbackDate As Date)
bool = True
End Sub
Private Sub Form_GotFocus()
bool = True
MDIForm1.Combo1.Text = "[出租进货入库]"
End Sub
Private Sub Form_Load()
bool = True
MDIForm1.Combo1.Text = "[出租进货入库]"
DTPicker1.Value = Date
Combo1.clear
Combo1.AddItem "喜剧片"
Combo1.AddItem "武打片"
Combo1.AddItem "枪战片"
Combo1.AddItem "言情片"
Combo1.AddItem "恐怖片"
Combo1.AddItem "记实片"
Combo1.AddItem "纪录片"
Combo2.AddItem "英语"
Combo2.AddItem "法语"
Combo2.AddItem "国语"
Combo2.AddItem "日语"
Combo2.AddItem "台语"
Combo2.AddItem "闽南语"
Combo2.AddItem "俄语"
Combo2.AddItem "德语"
End Sub
Private Sub Form_LostFocus()
Unload Me
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = ""
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Dim str As Integer
If Adodc1.Recordset("电影名").ActualSize = 0 Or Adodc1.Recordset("主演").ActualSize = 0 Or Adodc1.Recordset("类型").ActualSize = 0 Or Adodc1.Recordset("语种").ActualSize = 0 Then
MDIForm1.StatusBar1.Panels(1) = "输入有误"
str = MsgBox("输入不完整数据是否继续输入?", 36, "请输入完整数据")
If str = 7 Then
Adodc1.Recordset.Delete
Else
Cancel = 1
End If
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub Text1_LostFocus()
If Text1.Text <> "" Then
Adodc1.Recordset("盘号") = Text1.Text
End If
End Sub
Private Sub Text1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "输入盘号"
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub
Private Sub Text2_LostFocus()
If Text2.Text <> "" Then
Adodc1.Recordset("电影名") = Text2.Text
End If
End Sub
Private Sub Text2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "输入电影名"
End Sub
Private Sub Text3_LostFocus()
If Text3.Text <> "" Then
Adodc1.Recordset("主演") = Text3.Text
bool = True
End If
End Sub
Private Sub Text3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "输入电影主演"
End Sub
Private Sub Text6_KeyUp(KeyCode As Integer, Shift As Integer)
MDIForm1.StatusBar1.Panels(1) = "输入电影内容简介"
End Sub
Private Sub Text6_LostFocus()
Adodc1.Recordset("内容") = Text6.Text
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -