📄 frmlookstudentborrow.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "msflxgrd.ocx"
Begin VB.Form Frmlookstudentborrow
Caption = "Form1"
ClientHeight = 4320
ClientLeft = 60
ClientTop = 465
ClientWidth = 7875
LinkTopic = "Form1"
ScaleHeight = 4320
ScaleWidth = 7875
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = " 返 回 "
Height = 495
Left = 5280
TabIndex = 3
Top = 360
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "确 定"
Height = 495
Left = 3480
TabIndex = 2
Top = 360
Width = 1215
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 4320
Top = 3600
Visible = 0 'False
Width = 1935
_ExtentX = 3413
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = $"Frmlookstudentborrow.frx":0000
OLEDBString = $"Frmlookstudentborrow.frx":008C
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from Borrow_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 MSFlexGridLib.MSFlexGrid MSFlexGrid1
Height = 2415
Left = 240
TabIndex = 1
Top = 1080
Width = 6855
_ExtentX = 12091
_ExtentY = 4260
_Version = 393216
End
Begin MSAdodcLib.Adodc Adodc2
Height = 330
Left = 1560
Top = 3600
Visible = 0 'False
Width = 2175
_ExtentX = 3836
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = $"Frmlookstudentborrow.frx":0118
OLEDBString = $"Frmlookstudentborrow.frx":01A4
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from class_message"
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 MSDataListLib.DataCombo DataCombo1
Bindings = "Frmlookstudentborrow.frx":0230
DataSource = "Adodc2"
Height = 330
Left = 120
TabIndex = 0
Top = 360
Width = 2055
_ExtentX = 3625
_ExtentY = 582
_Version = 393216
ListField = "class_name"
Text = "请选择。。。"
End
End
Attribute VB_Name = "Frmlookstudentborrow"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Classid As String
Private Sub Command1_Click()
Dim j As Integer
For j = 1 To 14
For i = 0 To 5
Me.MSFlexGrid1.TextMatrix(j, i) = ""
Next i
Next j
x = 1
Open_borrow_book
Do While cnn.EOF = False
If cnn.EOF = True Then
Exit Sub
End If
If Classid = cnn.Fields(9).Value Then
For i = 0 To 3
Me.MSFlexGrid1.TextMatrix(x, i) = Trim(cnn.Fields(i + 1).Value)
Next i
Me.MSFlexGrid1.TextMatrix(x, 4) = Trim(cnn.Fields(6).Value)
Me.MSFlexGrid1.TextMatrix(x, 5) = Trim(cnn.Fields(7).Value)
x = x + 1
End If
cnn.MoveNext
Loop
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub DataCombo1_Click(Area As Integer)
Adodc1.RecordSource = "select * from Borrow_book where student_class='046141' " '& " '" & Classid & "' "
Adodc1.Refresh
Open_class_message
Do While cnn.EOF = False
If cnn.EOF = True Then
Exit Do
End If
If DataCombo1.Text = cnn.Fields(1).Value Then
Classid = cnn.Fields(0).Value
End If
cnn.MoveNext
Loop
End Sub
Private Sub Form_Load()
MSFlexGrid1.Rows = 15
MSFlexGrid1.Cols = 6
Me.MSFlexGrid1.TextMatrix(0, 0) = "学号"
'MSFlexGrid1.ColWidth(0) = 942
Me.MSFlexGrid1.TextMatrix(0, 1) = "姓名"
'MSFlexGrid1.ColWidth(1) = 1142
Me.MSFlexGrid1.TextMatrix(0, 2) = "图书编号"
'MSFlexGrid1.ColWidth(2) = 1242
'MSFlexGrid1.ColWidth(3) = 1000
Me.MSFlexGrid1.TextMatrix(0, 3) = "图书名称"
MSFlexGrid1.ColWidth(4) = 1350
MSFlexGrid1.ColWidth(5) = 1350
Me.MSFlexGrid1.TextMatrix(0, 4) = "借书时间"
Me.MSFlexGrid1.TextMatrix(0, 5) = "还书时间"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -