📄 vcdsearch.frm
字号:
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 1
Left = 6360
TabIndex = 2
Top = 360
Width = 1815
End
Begin VB.OptionButton Option1
Caption = "按专辑名查寻"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 0
Left = 3240
TabIndex = 1
Top = 360
Width = 2295
End
Begin VB.Frame Frame1
Caption = "VCD查寻"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 480
TabIndex = 0
Top = 120
Width = 10935
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 = 720
TabIndex = 12
Top = 840
Width = 1695
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 = 9240
TabIndex = 11
Top = 840
Width = 1695
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 = 6360
TabIndex = 9
Top = 840
Width = 1455
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 = 495
Left = 3240
TabIndex = 7
Top = 840
Width = 1215
End
Begin VB.Label Label1
Caption = "VCD查寻管理"
BeginProperty Font
Name = "Arial"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 7560
TabIndex = 5
Top = 240
Width = 3135
End
End
Attribute VB_Name = "vcdsearch1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim str As String
Private Sub Command1_Click()
MDIForm1.StatusBar1.Panels(1) = "按专辑盘号查找专辑"
DataEnvironment1.rsCommand1.MoveFirst
For i = 0 To DataEnvironment1.rsCommand1.RecordCount - 1
DataEnvironment1.rsCommand1.Find "盘号=" & Text4.Text & ""
Next
If DataEnvironment1.rsCommand1.EOF Then
MDIForm1.StatusBar1.Panels(1) = "没有发现"
MsgBox "没有发现", 64, "没有发现"
DataEnvironment1.rsCommand1.MoveFirst
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()
MDIForm1.StatusBar1.Panels(1) = "按专辑名查找专辑"
For i = 0 To DataEnvironment1.rsCommand1.RecordCount - 1
DataEnvironment1.rsCommand1.Find "专辑名='" & Text1.Text & "'"
Next
If DataEnvironment1.rsCommand1.EOF Then
MDIForm1.StatusBar1.Panels(1) = "没有发现"
MsgBox "没有发现", 64, "没有发现"
DataEnvironment1.rsCommand1.MoveFirst
End If
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()
MDIForm1.StatusBar1.Panels(1) = "按歌名查找专辑"
Dim sql As String
Dim constr As String
Dim s As String, i As Integer
constr = "Provider=Microsoft.Jet.OLEDB.4.0;" & "data source=d:\毕业设计\设计\数据库\音像管理.mdb"
Adodc1.ConnectionString = constr
Adodc1.CommandType = adCmdText
sql = "select 总表.盘号,总表.专辑名,总表.价格,总表.数量,专辑数据.编号,专辑数据.歌名,专辑数据.歌首名 from 总表,专辑数据 where 总表.盘号 = 专辑数据.盘号 and 专辑数据.盘号 in (select 专辑数据.盘号 from 专辑数据 where 专辑数据.歌名='" & Text2.Text & "')"
Adodc1.RecordSource = sql
Adodc1.Refresh
List1.clear
While Not Adodc1.Recordset.EOF
s = ""
For i = 0 To Adodc1.Recordset.Fields.Count - 1
s = s & Adodc1.Recordset.Fields(i).Value & Chr(vbKeyTab)
Next
List1.AddItem s
Adodc1.Recordset.MoveNext
Wend
If s = "" Then
MsgBox "没有发现", 64, "没有发现"
End If
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()
Dim sql As String
Dim constr As String
Dim s As String, i As Integer
constr = "Provider=Microsoft.Jet.OLEDB.4.0;" & "data source=d:\毕业设计\设计\数据库\音像管理.mdb"
Adodc2.ConnectionString = constr
Adodc2.CommandType = adCmdText
sql = "select 总表.盘号,总表.专辑名,总表.价格,总表.数量,专辑数据.编号,专辑数据.歌名,专辑数据.歌首名 from 总表,专辑数据 where 总表.盘号 = 专辑数据.盘号 and 专辑数据.盘号 in (select 专辑数据.盘号 from 专辑数据 where 专辑数据.歌首名='" & Text3.Text & "')"
Adodc2.RecordSource = sql
Adodc2.Refresh
List1.clear
While Not Adodc2.Recordset.EOF
s = ""
For i = 0 To Adodc2.Recordset.Fields.Count - 1
s = s & Adodc2.Recordset.Fields(i).Value & Chr(vbKeyTab)
Next
List1.AddItem s
Adodc2.Recordset.MoveNext
Wend
If s = "" Then
MsgBox "没有发现", 64, "没有发现"
End If
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 Form_GotFocus()
MDIForm1.Combo1.Text = "[歌碟库存查寻]"
End Sub
Private Sub Form_Load()
MDIForm1.Combo1.Text = "[歌碟库存查寻]"
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 Option1_Click(Index As Integer)
Dim sql As String
Select Case Index
Case 0
MDIForm1.StatusBar1.Panels(1) = "按盘号查找专辑"
Text1.Enabled = True
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
'sql = "select * from 总表,专辑数据 where 总表.专辑名='" & Text1.Text & "'"
Text1.SetFocus
DataGrid1.Visible = True
DataGrid2.Visible = True
Picture1.Visible = False
List1.Visible = False
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
List1.clear
Case 1
MDIForm1.StatusBar1.Panels(1) = "按专辑名查找专辑"
Text2.Enabled = True
Text1.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
'sql = "select * from 总表,专辑数据 where 专辑数据.歌名='" & Text2.Text & "'"
Text2.SetFocus
DataGrid1.Visible = False
DataGrid2.Visible = False
Picture1.Visible = True
List1.Visible = True
Text1.Text = ""
Text3.Text = ""
Text4.Text = ""
List1.clear
Case 2
MDIForm1.StatusBar1.Panels(1) = "按歌名查找专辑"
Text3.Enabled = True
Text1.Enabled = False
Text2.Enabled = False
Text4.Enabled = False
'sql = "select * from 总表,专辑数据 where 专辑数据.歌首名='" & Text3.Text & "'"
Text3.SetFocus
DataGrid1.Visible = False
DataGrid2.Visible = False
Picture1.Visible = True
List1.Visible = True
Text2.Text = ""
Text1.Text = ""
Text4.Text = ""
List1.clear
Case 3
MDIForm1.StatusBar1.Panels(1) = "按歌手名查找专辑"
Text4.Enabled = True
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
'sql = "select * from 总表,专辑数据 where 总表.发行时间='" & Text4.Text & "'"
Text4.SetFocus
DataGrid1.Visible = True
DataGrid2.Visible = True
Picture1.Visible = False
List1.Visible = False
Text2.Text = ""
Text1.Text = ""
Text3.Text = ""
List1.clear
End Select
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command2.Value = True
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command3.Value = True
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command4.Value = True
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1.Value = True
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -