📄 main_kfcx.frm
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form main_kfcx
BorderStyle = 3 'Fixed Dialog
Caption = "客房查询"
ClientHeight = 4065
ClientLeft = 1560
ClientTop = 2055
ClientWidth = 9150
Icon = "main_kfcx.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4065
ScaleWidth = 9150
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "D:\行业管理软件之一\客房管理系统\Kfgl.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 390
Left = 3780
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "kf"
Top = 150
Visible = 0 'False
Width = 1185
End
Begin VB.Frame Frame1
Height = 690
Left = 45
TabIndex = 1
Top = -45
Width = 8985
Begin VB.CommandButton Command3
BackColor = &H00C0C0C0&
Caption = "退出"
Height = 330
Left = 7755
Style = 1 'Graphical
TabIndex = 6
Top = 255
Width = 1050
End
Begin VB.CommandButton Command2
BackColor = &H00C0C0C0&
Caption = "删除"
Height = 330
Left = 6615
Style = 1 'Graphical
TabIndex = 5
Top = 255
Width = 1050
End
Begin VB.CommandButton Command1
BackColor = &H00C0C0C0&
Caption = "修改"
Height = 330
Left = 5430
Style = 1 'Graphical
TabIndex = 4
Top = 255
Width = 1050
End
Begin VB.TextBox Text1
Height = 315
Left = 1050
TabIndex = 2
Top = 225
Width = 2400
End
Begin VB.Label Label1
Caption = "房间号:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 90
TabIndex = 3
Top = 255
Width = 915
End
End
Begin MSDBGrid.DBGrid DBGrid1
Bindings = "main_kfcx.frx":000C
Height = 3240
Left = 60
OleObjectBlob = "main_kfcx.frx":0020
TabIndex = 0
Top = 705
Width = 9015
End
End
Attribute VB_Name = "main_kfcx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load() '自动识别数据库路径
Data1.DatabaseName = App.Path & "\KFGL.MDB"
End Sub
Private Sub Form_Unload(Cancel As Integer)
main.Enabled = True
End Sub
Private Sub Text1_Change()
'查询客房信息
Data1.RecordSource = "select * from kf where kf.房间号 like " + Chr(34) + Text1.Text + "*" + Chr(34) + ""
Data1.Refresh
End Sub
Private Sub Command1_Click() '允许修改客房信息
DBGrid1.AllowUpdate = True
End Sub
Private Sub Command2_Click() '删除客房信息
If Data1.Recordset.RecordCount > 0 Then
Data1.Recordset.Delete
Data1.Refresh
End If
End Sub
Private Sub Command3_Click()
main.Enabled = True
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -