?? frm_ft.frm
字號:
VERSION 5.00
Begin VB.Form frm_ft
Caption = "變改房態"
ClientHeight = 4245
ClientLeft = 60
ClientTop = 345
ClientWidth = 5970
Icon = "frm_ft.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4245
ScaleWidth = 5970
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command3
Cancel = -1 'True
Caption = "退出"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 3840
TabIndex = 10
Top = 3735
Width = 915
End
Begin VB.Frame Frame2
Caption = "還原"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1245
Left = 1170
TabIndex = 5
Top = 2370
Width = 3750
Begin VB.CommandButton Command2
Caption = "確定"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 2655
TabIndex = 9
Top = 435
Width = 915
End
Begin VB.ComboBox cmb_fh1
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 1080
TabIndex = 8
Text = "Combo1"
Top = 435
Width = 1335
End
Begin VB.Label Label3
Caption = "房號"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 360
TabIndex = 6
Top = 480
Width = 510
End
End
Begin VB.Frame Frame1
Caption = "設定房態"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1620
Left = 1155
TabIndex = 1
Top = 510
Width = 3720
Begin VB.CommandButton Command1
Caption = "確定"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 2655
TabIndex = 7
Top = 960
Width = 915
End
Begin VB.ComboBox cmb_fh
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 1005
TabIndex = 0
Text = "Combo1"
Top = 375
Width = 1335
End
Begin VB.ComboBox cmb_ft
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 1035
TabIndex = 4
Text = "Combo2"
Top = 990
Width = 1335
End
Begin VB.Label Label2
Caption = "房態"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 285
TabIndex = 3
Top = 1035
Width = 510
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 = 315
Left = 285
TabIndex = 2
Top = 480
Width = 510
End
End
End
Attribute VB_Name = "frm_ft"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public msgtext As String
Private Sub cmb_fh_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmb_ft.SetFocus
End If
End Sub
Private Sub cmb_fh1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command2.SetFocus
End If
End Sub
Private Sub cmb_ft_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1.SetFocus
End If
End Sub
Private Sub Command1_Click()
' Dim mytemp As Recordset
Dim mytemp As ADODB.Recordset
If cmb_fh.text = "" Then
MsgBox "沒有輸入包廂號", vbOKOnly, "提示"
Exit Sub
End If
sql$ = "select * from roominfo where trim(room_number)=" & Trim(cmb_fh.text)
sql$ = sql$ & " and user_flag<>-1"
' Set mytemp = myDB.OpenRecordset(sql, dbOpenDynaset)
Set mytemp = ExecuteSQL(sql$, msgtext)
If mytemp.EOF Then
cmb_fh.SetFocus
Exit Sub
End If
' mytemp.Edit
'mytemp!time_yd = yd_time.Value
'mytemp!flag_yd = True
mytemp!user_flag = -2
'mytemp!Phone = yd_tell
' mytemp!pozition = cmb_ft.text
mytemp.Update
Form_Activate
End Sub
Private Sub Command2_Click()
' Dim mytemp As Recordset
Dim mytemp As ADODB.Recordset
If cmb_fh1.text = "" Then
MsgBox "沒有輸入包廂號", vbOKOnly, "提示"
Exit Sub
End If
If IsNumeric(cmb_fh1.text) Then
sql$ = "select * from roominfo where trim(room_number)=" & Trim(cmb_fh1.text)
' Set mytemp = myDB.OpenRecordset(sql, dbOpenDynaset)
Set mytemp = ExecuteSQL(sql$, msgtext)
If mytemp.EOF Then
Exit Sub
End If
' mytemp.Edit
'mytemp!time_yd = yd_time.Value
'mytemp!flag_yd = True
' If mytemp!user = -5 Then
' mytemp!user = 0
' Else
mytemp!user_flag = 0
' End If
'mytemp!Phone = yd_tell
' mytemp!pozition = " "
mytemp.Update
Else
If cmb_fh1.text = "全部" Then
sql$ = "update roominfo set user_flag=0 where user_flag=-2"
' myDB.Execute sql$
Set mytemp = ExecuteSQL(sql$, msgtext)
End If
End If
Form_Activate
End Sub
Private Sub Command3_Click()
Dim crrow As Integer
Dim tcrrow As Integer
' crrow = frm_main.msglist.row
' tcrrow = frm_main.msglist.TopRow
' frm_main.TxtSQL = "select room_number,room_name,employee_id,starttime,planpeoplecount,user_flag,supplier_id,roomcount from"
' frm_main.TxtSQL = frm_main.TxtSQL & " roominfo"
' frm_main.TxtSQL = frm_main.TxtSQL & " order by 1"
' Call frm_main.ShowData(frm_main.msglist)
' frm_main.msglist.row = crrow
' frm_main.msglist.TopRow = tcrrow
Unload Me
End Sub
Private Sub Form_Activate()
'Dim myssdaima As Recordset
Dim myssdaima As ADODB.Recordset
cmb_fh.Clear
sql$ = "select room_number from roominfo where user_flag=0 order by room_number"
' Set myssdaima = myDB.OpenRecordset(sql$, dbOpenSnapshot)
Set myssdaima = ExecuteSQL(sql$, msgtext)
If myssdaima.EOF = -1 Then Exit Sub
Do Until myssdaima.EOF
cmb_fh.AddItem "" & myssdaima!room_number
myssdaima.MoveNext
Loop
myssdaima.Close
Set myssdaima = Nothing
cmb_fh1.Clear
cmb_fh1.AddItem "全部"
sql$ = "select room_number from roominfo where user_flag<=-2 order by room_number"
' Set myssdaima = myDB.OpenRecordset(sql$, dbOpenSnapshot)
Set myssdaima = ExecuteSQL(sql$, msgtext)
If myssdaima.EOF = -1 Then Exit Sub
Do Until myssdaima.EOF
cmb_fh1.AddItem "" & myssdaima!room_number
myssdaima.MoveNext
Loop
myssdaima.Close
Set myssdaima = Nothing
End Sub
Private Sub Form_Load()
cmb_ft.AddItem "整理"
cmb_ft.AddItem "檢修"
cmb_ft.ListIndex = 0
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -