📄 edbook.frm
字号:
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column04
DataField = "出版社"
Caption = "出版社"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column05
DataField = "定价"
Caption = "定价"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column06
DataField = "入库日期"
Caption = "入库日期"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column07
DataField = "借否"
Caption = "借否"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
ColumnWidth = 1635.024
EndProperty
BeginProperty Column01
ColumnWidth = 1289.764
EndProperty
BeginProperty Column02
ColumnWidth = 1844.787
EndProperty
BeginProperty Column03
ColumnWidth = 1365.165
EndProperty
BeginProperty Column04
ColumnWidth = 2009.764
EndProperty
BeginProperty Column05
ColumnWidth = 959.811
EndProperty
BeginProperty Column06
ColumnWidth = 1080
EndProperty
BeginProperty Column07
ColumnWidth = 510.236
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 360
Top = 0
Visible = 0 'False
Width = 1215
_ExtentX = 2143
_ExtentY = 582
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= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=libary"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "libary"
OtherAttributes = ""
UserName = "sa"
Password = "HZbp0802"
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
End
Attribute VB_Name = "edbook"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Comm1_Click()
flag = 1
edbook1.Show vbModal
End Sub
Private Sub Comm2_Click()
flag = 2
edbook1.Show vbModal
End Sub
Private Sub Comm3_Click()
If MsgBox("真的要删除[" + Trim(Adodc1.Recordset.Fields("书名")) + "]吗?" _
, vbOKOnly, "信息提示") = vbYes Then
Adodc1.Recordset.Delete
recs = ress - 1
Call encomm
End If
End Sub
Private Sub Comm4_Click()
Unload Me
End Sub
Private Sub Form_Activate()
DataGrid1.SetFocus
Call encomm
End Sub
Private Sub Form_Load()
recs = Adodc1.Recordset.RecordCount
End Sub
Private Sub selcmd1_Click()
Dim str As String
str = ""
If Trim(Text1(0).Text) <> "" Then
If str = "" Then
str = "图书编号='" + Trim(Text1(0).Text) + "'"
Else
str = str + "and 图书编号='" + Trim(Text1(0).Text) + "'"
End If
End If
If Trim(Text1(1).Text) <> "" Then
If str = "" Then
str = "书名='" + Trim(Text1(2).Text) + "'"
Else
str = str + "and 书名='" + Trim(Text1(2).Text) + "'"
End If
End If
If Trim(Text1(2).Text) <> "" Then
If str = "" Then
str = "作者='" + Trim(Text1(2).Text) + "'"
Else
str = str + "and 作者='" + Trim(Text1(2).Text) + "'"
End If
End If
If Trim(Text1(3).Text) <> "" Then
If str = "" Then
str = "出版社='" + Trim(Text1(3).Text) + "'"
Else
str = str + "and 出版社='" + Trim(Text1(3).Text) + "'"
End If
End If
If Trim(Text1(4).Text) <> "" Then
If str = "" Then
str = "借否='" + Trim(Text1(4).Text) + "'"
Else
str = str + "and 借否='" + Trim(Text1(4).Text) + "'"
End If
End If
If str <> "" Then
Adodc1.RecordSource = "select * from book where " + str
Adodc1.Refresh
Else
Adodc1.RecordSource = "select * from book"
Adodc1.Refresh
End If
recs = Adodc1.Recordset.RecordCount
If recs = 0 Then
MsgBox "没有任何满足条件的记录", vbOKOnly, "信息提示"
End If
Call encomm
End Sub
Private Sub selcmd2_Click()
Text1(0).Text = ""
Text1(1).Text = ""
Text1(2).Text = ""
Text1(3).Text = ""
Text1(4).Text = ""
End Sub
Private Sub encomm()
If recs = 0 Then
Comm2.Enabled = False
Comm3.Enabled = False
Else
Comm2.Enabled = True
Comm3.Enabled = True
End If
End Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
Call endata(KeyAscii)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -