?? form1.frm
字號:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form form1
BorderStyle = 3 'Fixed Dialog
Caption = "SQL使用技巧-客房查詢"
ClientHeight = 6360
ClientLeft = 1560
ClientTop = 2055
ClientWidth = 9150
Icon = "form1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6360
ScaleWidth = 9150
ShowInTaskbar = 0 'False
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "C:\mrjd\kfgl.mdb"
DefaultCursorType= 0 '缺省游標
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 615
Left = 3120
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "kf"
Top = 2805
Visible = 0 'False
Width = 1890
End
Begin VB.Frame Frame1
Height = 690
Left = 135
TabIndex = 1
Top = 15
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 = "form1.frx":030A
Height = 5580
Left = 120
OleObjectBlob = "form1.frx":031E
TabIndex = 0
Top = 735
Width = 9015
End
End
Attribute VB_Name = "form1"
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"
Data1.Connect = ";pwd=" & 1217
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 Form_Activate()
Data1.RecordSource = "select * from kf where kf.房間號 like " + Chr(34) + "*" + Chr(34) + "order by 房間號"
Data1.Refresh
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 Command3_Click()
End
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -