📄 form4.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form Form4
Caption = "find"
ClientHeight = 5160
ClientLeft = 60
ClientTop = 345
ClientWidth = 7095
Icon = "Form4.frx":0000
LinkTopic = "Form4"
LockControls = -1 'True
Picture = "Form4.frx":1082
ScaleHeight = 5160
ScaleWidth = 7095
StartUpPosition = 3 '窗口缺省
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "D:\注意!地雷\hotel\开门信息数据库.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 405
Left = 720
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "开门信息数据"
Top = 4560
Visible = 0 'False
Width = 5610
End
Begin VB.CommandButton Command2
Caption = "返 回"
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4320
TabIndex = 5
Top = 3480
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "查 找"
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2760
TabIndex = 4
Top = 3480
Width = 1215
End
Begin VB.OptionButton Option4
Caption = "房间号"
BeginProperty Font
Name = "黑体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4200
TabIndex = 3
Top = 2640
Width = 1215
End
Begin VB.OptionButton Option3
Caption = "时间"
BeginProperty Font
Name = "黑体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2760
TabIndex = 2
Top = 2640
Width = 1215
End
Begin VB.OptionButton Option2
Caption = "日期"
BeginProperty Font
Name = "黑体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4200
TabIndex = 1
Top = 2040
Width = 1215
End
Begin VB.OptionButton Option1
Caption = "卡号"
BeginProperty Font
Name = "黑体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2760
TabIndex = 0
Top = 2040
Width = 1215
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Bindings = "Form4.frx":25F10
Height = 1695
Left = 360
TabIndex = 7
Top = 0
Width = 5415
_ExtentX = 9551
_ExtentY = 2990
_Version = 393216
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "请从右边选项中 选择关键字查找"
BeginProperty Font
Name = "幼圆"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 855
Left = 360
TabIndex = 6
Top = 2160
Width = 2295
End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim mzy As String
If Option1.Value = True Then
myz = InputBox$("请输入卡号", "查找框")
Data1.RecordSource = "select * from 开门信息数据 where 卡号='" & myz & " '"
Data1.Refresh
If Data1.Recordset.EOF Then
MsgBox "无此记录!", , "提示"
Data1.RecordSource = "开门信息数据"
Data1.Refresh
End If
ElseIf Option2.Value = True Then
myz = InputBox$("请输入日期,格式为YYYY-MM-DD", "查找框")
Data1.RecordSource = "select * from 开门信息数据 where 日期='" & myz & " '"
Data1.Refresh
If Data1.Recordset.EOF Then
MsgBox "无此记录!", , "提示"
Data1.RecordSource = "开门信息数据"
Data1.Refresh
End If
ElseIf Option3.Value = True Then
myz = InputBox$("请输入时间,格式为HH:MM", "查找框")
Data1.RecordSource = "select * from 开门信息数据 where 时间='" & myz & " '"
Data1.Refresh
If Data1.Recordset.EOF Then
MsgBox "无此记录!", , "提示"
Data1.RecordSource = "开门信息数据"
Data1.Refresh
End If
ElseIf Option4.Value = True Then
myz = InputBox$("请输入房间号", "查找框")
Data1.RecordSource = "select * from 开门信息数据 where 房间号='" & myz & " '"
Data1.Refresh
If Data1.Recordset.EOF Then
MsgBox "无此记录!", , "提示"
Data1.RecordSource = "开门信息数据"
Data1.Refresh
End If
End If
End Sub
Private Sub Command2_Click()
Form4.Hide
Form3.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -