📄 form5.frm
字号:
Top = 120
Width = 3495
Begin VB.CommandButton Command11
Caption = "按资产名称查询"
Height = 375
Left = 360
TabIndex = 10
Top = 2640
Width = 1455
End
Begin VB.CommandButton Command10
Caption = "按使用人查询"
Height = 375
Left = 1920
TabIndex = 9
Top = 2640
Width = 1455
End
Begin VB.CommandButton Command9
Caption = "按编号查询"
Height = 375
Left = 1200
Picture = "Form5.frx":107F
TabIndex = 8
Top = 1920
Width = 1215
End
Begin VB.TextBox Text11
Height = 375
Left = 840
TabIndex = 7
Top = 1080
Width = 1935
End
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "编 号:"
Height = 495
Left = 120
TabIndex = 21
Top = 720
Width = 1935
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "已用年限:"
Height = 495
Left = 3360
TabIndex = 20
Top = 2280
Width = 1935
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "使用人:"
Height = 495
Left = 120
TabIndex = 19
Top = 2280
Width = 1935
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "资产号:"
Height = 495
Left = 120
TabIndex = 18
Top = 4200
Width = 1935
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "购买日期:"
Height = 495
Left = 3360
TabIndex = 17
Top = 4200
Width = 1935
End
Begin VB.Label Label10
BackStyle = 0 'Transparent
Caption = "资产名称"
Height = 495
Left = 3360
TabIndex = 16
Top = 720
Width = 1935
End
Begin VB.Line Line1
X1 = 6720
X2 = 6720
Y1 = 120
Y2 = 5760
End
End
Begin MSDataGridLib.DataGrid DataGrid2
Bindings = "Form5.frx":1949
Height = 1935
Left = 0
TabIndex = 23
Top = 6960
Width = 10815
_ExtentX = 19076
_ExtentY = 3413
_Version = 393216
AllowUpdate = 0 'False
Enabled = -1 'True
HeadLines = 1
RowHeight = 15
FormatLocked = -1 'True
AllowAddNew = -1 'True
AllowDelete = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
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
ColumnCount = 7
BeginProperty Column00
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 Column01
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 Column02
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 Column03
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 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
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
ColumnWidth = 1275.024
EndProperty
BeginProperty Column01
ColumnWidth = 1230.236
EndProperty
BeginProperty Column02
ColumnWidth = 1184.882
EndProperty
BeginProperty Column03
ColumnWidth = 1200.189
EndProperty
BeginProperty Column04
ColumnWidth = 1695.118
EndProperty
BeginProperty Column05
ColumnWidth = 1049.953
EndProperty
BeginProperty Column06
ColumnWidth = 2835.213
EndProperty
EndProperty
End
End
Attribute VB_Name = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Adodc1.Recordset.BOF = True Then
MsgBox "这已经是第一条信息了!", 16, "出错:"
Adodc1.Recordset.MoveNext
Else
Adodc1.Recordset.MovePrevious
End If
End Sub
Private Sub Command10_Click()
If Text11.Text = "" Then
MsgBox "没有输入查询条件!", 16, "提示!"
Adodc1.Recordset.MoveFirst
Text11.Text = ""
Text11.SetFocus
End If
Adodc1.Recordset.MoveFirst
Do While Adodc1.Recordset.EOF <> True
If Adodc1.Recordset.Fields("使用人").Value = Text11.Text Then
Text10.Text = Adodc1.Recordset.Fields("使用人").Value
Exit Do
End If
Adodc1.Recordset.MoveNext
Loop
Text11.Text = ""
End Sub
Private Sub Command11_Click()
If Text11.Text = "" Then
MsgBox "您没有输入要查询的条件!", 16, "出错:"
Text11.SetFocus
End If
Adodc1.Recordset.MoveFirst
Do While Adodc1.Recordset.EOF <> True
If Adodc1.Recordset.Fields("资产名称").Value = Text11.Text Then
Text1.Text = Adodc1.Recordset.Fields("资产名称").Value
Exit Do
End If
Adodc1.Recordset.MoveNext
Loop
Text11.Text = ""
End Sub
Private Sub Command2_Click()
If Adodc1.Recordset.EOF = True Then
MsgBox "已经到最后一条记录了!", 16, "提示!"
Adodc1.Recordset.MovePrevious
Else
Adodc1.Recordset.MoveNext
End If
End Sub
Private Sub Command4_Click()
If Adodc1.Recordset.EOF = True Then
MsgBox "已经到最后一条记录了!", 16, "提示!"
Adodc1.Recordset.MovePrevious
Else
Adodc1.Recordset.MoveLast
End If
End Sub
Private Sub Command9_Click()
If Text11.Text = "" Then
MsgBox "您没有输入要查询的条件!", 16, "出错:"
Text11.SetFocus
End If
Adodc1.Recordset.MoveFirst
Do While Adodc1.Recordset.EOF <> True
If Adodc1.Recordset.Fields("编号").Value = Text11.Text Then
Text1.Text = Adodc1.Recordset.Fields("编号").Value
Exit Do
End If
Adodc1.Recordset.MoveNext
Loop
Text11.Text = ""
End Sub
Private Sub Command3_Click()
If Adodc1.Recordset.BOF = True Then
MsgBox "这已经是第一条信息了!", 16, "出错:"
Adodc1.Recordset.MoveNext
Else
Adodc1.Recordset.MoveFirst
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -