📄 frmborrow1.frm
字号:
VERSION 5.00
Begin VB.Form frmBorrow1
BorderStyle = 3 'Fixed Dialog
Caption = "借书信息"
ClientHeight = 4368
ClientLeft = 48
ClientTop = 336
ClientWidth = 8112
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4368
ScaleWidth = 8112
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.TextBox Text1
Height = 270
Left = 1200
TabIndex = 25
TabStop = 0 'False
Top = 3960
Visible = 0 'False
Width = 735
End
Begin VB.TextBox txtNo
Height = 270
Left = 2520
TabIndex = 20
TabStop = 0 'False
Top = 3960
Visible = 0 'False
Width = 735
End
Begin VB.Frame Frame2
Caption = "读者信息"
Height = 3492
Left = 4080
TabIndex = 15
Top = 240
Width = 3735
Begin VB.ComboBox cboItem
Height = 288
Index = 6
Left = 1320
Style = 2 'Dropdown List
TabIndex = 24
Top = 1080
Width = 2175
End
Begin VB.ComboBox cboItem
Height = 288
Index = 5
Left = 1320
Style = 2 'Dropdown List
TabIndex = 23
Top = 720
Width = 2175
End
Begin VB.ComboBox cboItem
Height = 288
Index = 4
Left = 1320
Style = 2 'Dropdown List
TabIndex = 22
Top = 360
Width = 2175
End
Begin VB.TextBox txtItem
Height = 270
Index = 0
Left = 1320
MaxLength = 20
TabIndex = 5
Top = 1440
Width = 2175
End
Begin VB.TextBox txtItem
Height = 1200
Index = 1
Left = 240
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 6
Top = 2160
Width = 3252
End
Begin VB.Label Label2
Caption = "备 注 信 息:"
Height = 252
Index = 7
Left = 240
TabIndex = 21
Top = 1800
Width = 972
End
Begin VB.Label Label2
Caption = "读者种类:"
Height = 252
Index = 11
Left = 240
TabIndex = 19
Top = 1080
Width = 972
End
Begin VB.Label Label2
Caption = "借书日期:"
Height = 252
Index = 6
Left = 240
TabIndex = 18
Top = 1440
Width = 972
End
Begin VB.Label Label2
Caption = "读者姓名:"
Height = 255
Index = 5
Left = 240
TabIndex = 17
Top = 720
Width = 975
End
Begin VB.Label Label2
Caption = "读者编号:"
Height = 255
Index = 4
Left = 240
TabIndex = 16
Top = 360
Width = 975
End
End
Begin VB.Frame Frame1
Caption = "书籍信息"
Height = 3492
Left = 240
TabIndex = 9
Top = 240
Width = 3735
Begin VB.TextBox txtItem
Height = 960
Index = 5
Left = 1320
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 4
Top = 2400
Width = 2175
End
Begin VB.ComboBox cboItem
Height = 288
Index = 3
Left = 1320
Style = 2 'Dropdown List
TabIndex = 3
Top = 1920
Width = 2175
End
Begin VB.ComboBox cboItem
Height = 288
Index = 2
Left = 1320
Style = 2 'Dropdown List
TabIndex = 2
Top = 1440
Width = 2175
End
Begin VB.ComboBox cboItem
Height = 288
Index = 1
Left = 1320
Style = 2 'Dropdown List
TabIndex = 1
Top = 960
Width = 2175
End
Begin VB.ComboBox cboItem
Height = 288
Index = 0
Left = 1320
Style = 2 'Dropdown List
TabIndex = 0
Top = 480
Width = 2175
End
Begin VB.Label Label2
Caption = "出版社:"
Height = 255
Index = 3
Left = 240
TabIndex = 14
Top = 1920
Width = 975
End
Begin VB.Label Label2
Caption = "书籍名称:"
Height = 255
Index = 0
Left = 240
TabIndex = 13
Top = 480
Width = 975
End
Begin VB.Label Label2
Caption = "书籍类别:"
Height = 255
Index = 1
Left = 240
TabIndex = 12
Top = 960
Width = 975
End
Begin VB.Label Label2
Caption = "书籍备注信息:"
Height = 252
Index = 2
Left = 240
TabIndex = 11
Top = 2400
Width = 1092
End
Begin VB.Label Label2
Caption = "作者姓名:"
Height = 255
Index = 16
Left = 240
TabIndex = 10
Top = 1440
Width = 975
End
End
Begin VB.CommandButton cmdExit
Caption = "返回 (&X)"
Height = 375
Left = 6120
TabIndex = 8
Top = 3840
Width = 1215
End
Begin VB.CommandButton cmdSave
Caption = "保存 (&S)"
Height = 375
Left = 4680
TabIndex = 7
Top = 3840
Width = 1215
End
End
Attribute VB_Name = "frmBorrow1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'是否改动过记录,ture为改过
Dim mblChange As Boolean
Dim mrc As ADODB.Recordset
Public txtSQL As String
Dim bookNUM As Integer
Private Sub cboItem_Change(Index As Integer)
'有变化设置gblchange
mblChange = True
End Sub
Private Sub cboItem_Click(Index As Integer)
Dim mrcc As ADODB.Recordset
Dim mrcd As ADODB.Recordset
Dim intCount As Integer
Dim MsgText As String
If gintBOmode = 1 Then
If Index = 1 Then
cboItem(0).Clear
txtSQL = "select distinct bookname from books where booktype = '" & Trim(cboItem(1)) & "'"
Set mrcc = ExecuteSQL(txtSQL, MsgText)
If Not mrcc.EOF Then
Do While Not mrcc.EOF
cboItem(0).AddItem mrcc.Fields(0)
mrcc.MoveNext
Loop
End If
cboItem(0).ListIndex = 0
mrcc.Close
ElseIf Index = 0 Then
If Trim(cboItem(0)) = "" Then
MsgBox "请首先选择书籍种类!", vbOKOnly + vbExclamation, "警告"
cboItem(1).SetFocus
Exit Sub
Else
txtSQL = "select * from books where bookname = '" & Trim(cboItem(0)) & "'"
Set mrcd = ExecuteSQL(txtSQL, MsgText)
If Not mrcd.EOF Then
cboItem(2).Clear
cboItem(3).Clear
cboItem(2).AddItem mrcd!bookauthor
cboItem(3).AddItem mrcd!bookpub
cboItem(2).ListIndex = 0
cboItem(3).ListIndex = 0
txtItem(5) = mrcd!bookmemo
Text1 = mrcd!BookID
End If
mrcd.Close
End If
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -