📄 form1.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5700
ClientLeft = 60
ClientTop = 450
ClientWidth = 7575
LinkTopic = "Form1"
ScaleHeight = 5700
ScaleWidth = 7575
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command2
Caption = "EXIT"
Height = 375
Left = 3120
TabIndex = 22
Top = 4440
Width = 855
End
Begin VB.CommandButton Command1
Caption = "GO"
Height = 375
Left = 5880
TabIndex = 21
Top = 480
Width = 735
End
Begin MSAdodcLib.Adodc Adodc2
Height = 495
Left = 4320
Top = 5040
Visible = 0 'False
Width = 2535
_ExtentX = 4471
_ExtentY = 873
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = $"Form1.frx":0000
OLEDBString = $"Form1.frx":0099
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from lend"
Caption = "Adodc2"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Frame Frame1
Caption = "查询结果"
Height = 3255
Left = 120
TabIndex = 2
Top = 1080
Width = 7215
Begin VB.TextBox Text10
DataField = "vipID"
DataSource = "Adodc2"
Height = 375
Left = 1080
TabIndex = 20
Top = 2760
Width = 1215
End
Begin VB.TextBox Text9
DataField = "backtime"
DataSource = "Adodc2"
Height = 375
Left = 3960
TabIndex = 18
Top = 2160
Width = 1215
End
Begin VB.TextBox Text8
DataField = "lendtime"
DataSource = "Adodc2"
Height = 375
Left = 1080
TabIndex = 16
Top = 2160
Width = 1215
End
Begin VB.TextBox Text7
DataField = "lendstate"
DataSource = "Adodc2"
Height = 375
Left = 3960
TabIndex = 14
Top = 1560
Width = 1095
End
Begin VB.TextBox Text6
DataField = "date"
DataSource = "Adodc1"
Height = 375
Left = 1080
TabIndex = 12
Top = 1440
Width = 1215
End
Begin VB.TextBox Text5
DataField = "publisher"
DataSource = "Adodc1"
Height = 375
Left = 3960
TabIndex = 10
Top = 840
Width = 2175
End
Begin VB.TextBox Text4
DataField = "writer"
DataSource = "Adodc1"
Height = 375
Left = 1080
TabIndex = 8
Top = 840
Width = 1215
End
Begin VB.TextBox Text3
DataField = "bookname"
DataSource = "Adodc1"
Height = 375
Left = 3960
TabIndex = 6
Top = 240
Width = 1455
End
Begin VB.TextBox Text2
DataField = "bookID"
DataSource = "Adodc1"
Height = 375
Left = 1080
TabIndex = 4
Top = 240
Width = 1215
End
Begin VB.Label Label10
Caption = "借书会员ID:"
Height = 375
Left = 0
TabIndex = 19
Top = 2880
Width = 1215
End
Begin VB.Label Label9
Caption = "归还时间:"
Height = 375
Left = 2880
TabIndex = 17
Top = 2280
Width = 975
End
Begin VB.Label Label8
Caption = "借出时间:"
Height = 375
Left = 120
TabIndex = 15
Top = 2280
Width = 1095
End
Begin VB.Label Label7
Caption = "借出状态:"
Height = 255
Left = 2880
TabIndex = 13
Top = 1560
Width = 975
End
Begin VB.Label Label6
Caption = "出版日期:"
Height = 255
Left = 120
TabIndex = 11
Top = 1560
Width = 975
End
Begin VB.Label Label5
Caption = "出版社:"
Height = 255
Left = 3120
TabIndex = 9
Top = 960
Width = 735
End
Begin VB.Label Label4
Caption = "作者:"
Height = 255
Left = 360
TabIndex = 7
Top = 960
Width = 615
End
Begin VB.Label Label3
Caption = "书名:"
Height = 255
Left = 3240
TabIndex = 5
Top = 360
Width = 735
End
Begin VB.Label Label2
Caption = "书目ID:"
Height = 255
Left = 240
TabIndex = 3
Top = 360
Width = 735
End
End
Begin VB.TextBox Text1
Height = 375
Left = 3720
TabIndex = 1
Top = 480
Width = 1935
End
Begin MSAdodcLib.Adodc Adodc1
Height = 495
Left = 960
Top = 5040
Visible = 0 'False
Width = 2415
_ExtentX = 4260
_ExtentY = 873
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = $"Form1.frx":0132
OLEDBString = $"Form1.frx":01CB
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "book"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label1
Caption = "请输入要查询的书籍名称:"
Height = 255
Left = 1200
TabIndex = 0
Top = 480
Width = 2175
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim str As String
Dim str1 As String
str1 = Text1.Text
str = "SELECT * FROM book WHERE book.bookname ='" & str1 & "'"
Adodc1.RecordSource = str
Adodc1.Refresh
Adodc2.RecordSource = "select lendstate,lendtime,backtime,vipID from lend,book where book.bookname='" & str1 & "' and book.bookID=lend.bookID"
Adodc2.Refresh
If Adodc1.Recordset.EOF Then
MsgBox "无此书,请重新输入"
End If
If Text7.Text = "-1" Then
Text7 = "借出"
ElseIf Text7.Text = "0" Then
Text7 = "入库"
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -