📄 frmregister.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form FrmRegister
BorderStyle = 1 'Fixed Single
Caption = "借阅登记"
ClientHeight = 4680
ClientLeft = 45
ClientTop = 330
ClientWidth = 6840
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 4680
ScaleWidth = 6840
Begin VB.CommandButton cmdShowReader
Caption = "查看读者"
Height = 375
Left = 5640
TabIndex = 16
Top = 960
Width = 975
End
Begin VB.CommandButton cmdShowBook
Caption = "查看图书"
Height = 375
Left = 5640
TabIndex = 15
Top = 2160
Width = 975
End
Begin VB.ComboBox cmbSelectReader
Height = 315
Left = 1560
TabIndex = 14
Top = 960
Width = 1335
End
Begin VB.Data DatBorrow
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 375
Left = 3600
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 120
Visible = 0 'False
Width = 1575
End
Begin VB.Data DatRMessage
Caption = "Data2"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 375
Left = 5040
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 120
Visible = 0 'False
Width = 1455
End
Begin VB.Data DatBMessage
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 420
Left = 2400
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = -120
Visible = 0 'False
Width = 1815
End
Begin VB.TextBox TxtBookIndex
Height = 375
Left = 1560
TabIndex = 11
Top = 1560
Width = 1335
End
Begin VB.CommandButton CmdOK
Caption = "确定"
Height = 375
Left = 1560
TabIndex = 5
Top = 3600
Width = 1095
End
Begin VB.CommandButton CmdExit
Caption = "关闭"
Height = 375
Left = 4080
TabIndex = 4
Top = 3600
Width = 1095
End
Begin VB.TextBox TxtIndex
Height = 375
Left = 1560
TabIndex = 3
Top = 360
Width = 1335
End
Begin VB.TextBox TxtBookName
Height = 375
Left = 1560
TabIndex = 2
Top = 2160
Width = 4095
End
Begin VB.TextBox TxtBorrowTime
Height = 375
Left = 1560
TabIndex = 1
Top = 2760
Width = 2055
End
Begin VB.TextBox TxtReaderName
Height = 375
Left = 4200
TabIndex = 0
Top = 960
Width = 1455
End
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 375
Left = 0
TabIndex = 13
Top = 4305
Width = 6840
_ExtentX = 12065
_ExtentY = 661
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 3
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 6
Object.Width = 1764
MinWidth = 1764
TextSave = "2004-6-1"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 8114
MinWidth = 8114
Text = "当前状态:借阅书本。功能提示:可通过姓名选择读者。"
TextSave = "当前状态:借阅书本。功能提示:可通过姓名选择读者。"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 19599
MinWidth = 19599
Text = "帮助请按F1"
TextSave = "帮助请按F1"
EndProperty
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label Label2
Caption = "借阅时间"
Height = 375
Left = 600
TabIndex = 12
Top = 2880
Width = 1095
End
Begin VB.Label Label1
Caption = "读者姓名"
Height = 375
Index = 6
Left = 3240
TabIndex = 10
Top = 1080
Width = 975
End
Begin VB.Label Label1
Caption = "读者编号"
Height = 375
Index = 5
Left = 600
TabIndex = 9
Top = 1080
Width = 975
End
Begin VB.Label Label1
Caption = "图书编号"
Height = 375
Index = 4
Left = 600
TabIndex = 8
Top = 1680
Width = 975
End
Begin VB.Label Label1
Caption = "图书名称"
Height = 375
Index = 3
Left = 600
TabIndex = 7
Top = 2280
Width = 975
End
Begin VB.Label Label1
Caption = "借阅流水号"
Height = 375
Index = 0
Left = 600
TabIndex = 6
Top = 480
Width = 975
End
End
Attribute VB_Name = "FrmRegister"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'************************************************************************
'本窗本用于还返处理
'*************************************************************************
Option Explicit
Private rs As Recordset
Private RIErrorNow As Boolean
Private recReaderRs As Recordset
Private recBookRs As Recordset
Private Sub CmdExit_Click()
Set recReaderRs = Nothing
Set recBookRs = Nothing
DatBMessage.RecordSource = ""
DatBorrow.RecordSource = ""
DatRMessage.RecordSource = ""
DatRMessage.DatabaseName = ""
DatBMessage.DatabaseName = ""
DatBorrow.DatabaseName = ""
Unload Me
End Sub
Private Sub CmdOK_Click()
Dim dbname As String
Dim db As Database
Dim rs As Recordset
If TxtBookindex = "" Or TxtBookName = "" Or TxtReaderName = "" Or cmbSelectReader = "" Then
MsgBox "所有内容不为空!", vbOKOnly + vbInformation, "借阅登记"
Exit Sub
End If
If Right(App.Path, 1) <> "\" Then
dbname = App.Path & "\LibraryDB.mdb"
Else
dbname = App.Path & "librarydb.mdb"
End If
Set db = OpenDatabase(dbname)
' Set db = OpenDatabase("librarydb.mdb")
Set rs = db.OpenRecordset("select bookindex from borrowmessage where bookindex = " & TxtBookindex.Text & " and readerindex = " & cmbSelectReader & "And returntime = #1/1/1111# ")
If rs.RecordCount > 0 Then
MsgBox "此书已借出!", vbOKOnly + vbInformation, ""
Exit Sub
End If
DatBorrow.DatabaseName = DataPath
DatBorrow.RecordSource = "select * from borrowmessage "
DatBorrow.Refresh
With DatBorrow.Recordset
.AddNew
.Fields("bookindex") = TxtBookindex.Text
.Fields("readerindex") = cmbSelectReader.Text
.Fields("borrowtime") = TxtBorrowTime.Text
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -