📄 find1.frm
字号:
VERSION 5.00
Begin VB.Form Form5
Caption = "form5"
ClientHeight = 4290
ClientLeft = 60
ClientTop = 345
ClientWidth = 8040
LinkTopic = "Form5"
ScaleHeight = 4290
ScaleWidth = 8040
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame2
Height = 1215
Left = 120
TabIndex = 16
Top = 3000
Width = 7815
Begin VB.CommandButton Command1
Caption = "查找"
Height = 495
Left = 600
TabIndex = 19
Top = 360
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "继续查找"
Height = 495
Left = 3000
TabIndex = 18
Top = 360
Width = 1335
End
Begin VB.CommandButton Command3
Caption = "退出"
Height = 495
Left = 5640
TabIndex = 17
Top = 360
Width = 1335
End
End
Begin VB.Frame Frame1
Caption = "寝室卫生检查情况查找"
Height = 2775
Left = 120
TabIndex = 1
Top = 120
Width = 7815
Begin VB.TextBox Text1
DataField = "公寓号"
DataSource = "Data1"
Height = 390
Left = 960
TabIndex = 8
Top = 600
Width = 1455
End
Begin VB.TextBox Text2
DataField = "寝室号"
DataSource = "Data1"
Height = 375
Left = 3360
TabIndex = 7
Top = 600
Width = 1455
End
Begin VB.TextBox Text3
DataField = "检查日期"
DataSource = "Data1"
Height = 375
Left = 6000
TabIndex = 6
Top = 600
Width = 1455
End
Begin VB.TextBox Text4
DataField = "卫生状况"
DataSource = "Data1"
Height = 375
Left = 960
TabIndex = 5
Top = 1440
Width = 1455
End
Begin VB.TextBox Text5
DataField = "寝室名称"
DataSource = "Data1"
Height = 375
Left = 3360
TabIndex = 4
Top = 1440
Width = 1455
End
Begin VB.TextBox Text6
DataField = "寝室人数"
DataSource = "Data1"
Height = 375
Left = 6000
TabIndex = 3
Top = 1440
Width = 1455
End
Begin VB.TextBox Text7
DataField = "寝室责任人"
DataSource = "Data1"
Height = 375
Left = 3360
TabIndex = 2
Top = 2160
Width = 1455
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "公寓号"
ForeColor = &H000000C0&
Height = 180
Left = 240
TabIndex = 15
Top = 600
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "寝室号"
ForeColor = &H000000C0&
Height = 180
Left = 2640
TabIndex = 14
Top = 600
Width = 540
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "检查日期"
ForeColor = &H000000C0&
Height = 180
Left = 5040
TabIndex = 13
Top = 600
Width = 720
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "卫生状况"
ForeColor = &H000000C0&
Height = 180
Left = 240
TabIndex = 12
Top = 1440
Width = 720
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "寝室名称"
ForeColor = &H000000C0&
Height = 180
Left = 2640
TabIndex = 11
Top = 1440
Width = 720
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "寝室人数"
ForeColor = &H000000C0&
Height = 180
Left = 5040
TabIndex = 10
Top = 1440
Width = 720
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "寝室责任人"
ForeColor = &H000000C0&
Height = 180
Left = 2400
TabIndex = 9
Top = 2160
Width = 900
End
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "D:\xrh\disk1\DOWNLOAD\vb\程序代码\公寓管理\Mydb.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 405
Left = 1440
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "roomcleaner"
Top = 2640
Visible = 0 'False
Width = 1455
End
Begin VB.Label Label8
AutoSize = -1 'True
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00008000&
Height = 300
Left = 4560
TabIndex = 0
Top = 240
Width = 150
End
End
Attribute VB_Name = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim sql As String
Private Sub Command1_Click()
Load Form6
Form6.Show 1
If cancelflag Then Exit Sub
Data1.Recordset.FindFirst findstring
If Data1.Recordset.NoMatch Then
MsgBox "未找到符合条件的纪录!", 64, "数据查询"
End If
End Sub
Private Sub Command2_Click()
If Not Data1.Recordset.EOF And (Not Data1.Recordset.NoMatch) Then
Data1.Recordset.FindNext findstring
If Data1.Recordset.NoMatch Then
MsgBox "搜索完毕!", 64, "信息查询"
End If
End If
End Sub
Private Sub Command3_Click()
caidan.Show
Unload Me
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\mydb.mdb"
sql = "select cleaner.*,room.寝室名称,room.寝室人数,room.寝室责任人 from cleaner,room where room.公寓号=cleaner.公寓号 and room.寝室号=cleaner.寝室号 "
Data1.RecordSource = sql
Data1.Refresh
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -