?? frm_editbusinfo.frm
字號:
VERSION 5.00
Begin VB.Form frm_editbusinfo
Caption = "修改公車信息"
ClientHeight = 3540
ClientLeft = 60
ClientTop = 450
ClientWidth = 7035
LinkTopic = "Form1"
ScaleHeight = 3540
ScaleWidth = 7035
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
Height = 2655
Left = 240
TabIndex = 2
Top = 240
Width = 6255
Begin VB.TextBox bustype
Height = 285
Left = 4320
TabIndex = 9
Top = 360
Width = 1335
End
Begin VB.TextBox buydate
Height = 285
Left = 1440
TabIndex = 8
Top = 360
Width = 1335
End
Begin VB.TextBox seatNO
Height = 285
Left = 1440
TabIndex = 7
Top = 720
Width = 1335
End
Begin VB.TextBox usedate
Height = 285
Left = 4320
TabIndex = 6
Top = 720
Width = 1335
End
Begin VB.TextBox memo
Height = 885
Left = 1440
MultiLine = -1 'True
TabIndex = 5
Top = 1560
Width = 4455
End
Begin VB.TextBox Tv
Height = 285
Left = 4320
TabIndex = 4
Top = 1080
Width = 1335
End
Begin VB.TextBox Air
Height = 285
Left = 1440
TabIndex = 3
Top = 1080
Width = 1335
End
Begin VB.Label labelx
Caption = "汽車類型"
Height = 375
Left = 3120
TabIndex = 16
Top = 360
Width = 1335
End
Begin VB.Label Label2
Caption = "購買日期"
Height = 375
Left = 240
TabIndex = 15
Top = 360
Width = 1335
End
Begin VB.Label Label3
Caption = "座位個數"
Height = 375
Left = 240
TabIndex = 14
Top = 720
Width = 1335
End
Begin VB.Label Label4
Caption = "有無電視"
Height = 255
Left = 3120
TabIndex = 13
Top = 1080
Width = 975
End
Begin VB.Label Label5
Caption = "使用時間"
Height = 375
Left = 3120
TabIndex = 12
Top = 720
Width = 1335
End
Begin VB.Label Label6
Caption = "有無空調"
Height = 255
Left = 240
TabIndex = 11
Top = 1080
Width = 855
End
Begin VB.Label Label8
Caption = "備注"
Height = 375
Left = 240
TabIndex = 10
Top = 1560
Width = 1335
End
End
Begin VB.CommandButton cmd_OK
Caption = "修改"
Height = 375
Left = 1680
TabIndex = 1
Top = 3000
Width = 1215
End
Begin VB.CommandButton fault
Caption = "取消"
Height = 375
Left = 4200
TabIndex = 0
Top = 3000
Width = 1215
End
End
Attribute VB_Name = "frm_editbusinfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmd_OK_Click()
Dim strSQL As String
OpenDB
strSQL = "Select * from businfo where busno='" + CurrentBus + "'"
objRS.Open strSQL, objConn, 1, 3
'objRS.AddNew
'objRS.Fields(0).Value = buslineNO.Text
objRS.Fields(1).Value = bustype.Text
objRS.Fields(2).Value = CDate(buydate.Text)
objRS.Fields(3).Value = usedate.Text
objRS.Fields(4).Value = seatNO.Text
objRS.Fields(5).Value = Tv.Text
objRS.Fields(6).Value = Air.Text
objRS.Fields(7).Value = memo.Text
objRS.Update
objRS.Close
CloseDB
MsgBox "記錄已更新", vbOKOnly
frm_bus.FGridDatatable.Clear
frm_bus.ShowTitle
frm_bus.loadData ("")
Unload Me
frm_bus.Show
End Sub
Private Sub fault_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim strSQL As String
OpenDB
strSQL = "Select * from businfo where busno='" + CurrentBus + "'"
objRS.Open strSQL, objConn, 1, 3
bustype.Text = objRS.Fields(1).Value
buydate.Text = objRS.Fields(2).Value
usedate.Text = objRS.Fields(3).Value
seatNO.Text = objRS.Fields(4).Value
Tv.Text = objRS.Fields(5).Value
Air.Text = objRS.Fields(6).Value
memo.Text = objRS.Fields(7).Value
objRS.Close
CloseDB
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -