?? frm_addticketinfo.frm
字號:
VERSION 5.00
Begin VB.Form frm_addticketinfo
Caption = "添加購票信息"
ClientHeight = 3900
ClientLeft = 60
ClientTop = 450
ClientWidth = 6735
LinkTopic = "Form1"
ScaleHeight = 3900
ScaleWidth = 6735
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton fault
Caption = "取消"
Height = 375
Left = 4200
TabIndex = 14
Top = 3360
Width = 1215
End
Begin VB.CommandButton cmd_OK
Caption = "添加"
Height = 375
Left = 1680
TabIndex = 13
Top = 3360
Width = 1215
End
Begin VB.Frame Frame1
Height = 3015
Left = 240
TabIndex = 0
Top = 240
Width = 6255
Begin VB.TextBox price
Height = 285
Left = 1440
TabIndex = 18
Top = 1440
Width = 1335
End
Begin VB.TextBox tickettime
Height = 285
Left = 4320
TabIndex = 17
Top = 1080
Width = 1335
End
Begin VB.TextBox ticketNO
Height = 285
Left = 1440
TabIndex = 15
Top = 360
Width = 1335
End
Begin VB.TextBox memo
Height = 885
Left = 1440
MultiLine = -1 'True
TabIndex = 12
Top = 1920
Width = 4455
End
Begin VB.TextBox arrivalcity
Height = 285
Left = 4320
TabIndex = 9
Top = 720
Width = 1335
End
Begin VB.TextBox ticketdate
Height = 285
Left = 1440
TabIndex = 6
Top = 1080
Width = 1335
End
Begin VB.TextBox departcity
Height = 285
Left = 1440
TabIndex = 4
Top = 720
Width = 1335
End
Begin VB.TextBox busno
Height = 285
Left = 4320
TabIndex = 2
Top = 360
Width = 1335
End
Begin VB.Label Label9
Caption = "車票編號"
Height = 375
Left = 240
TabIndex = 16
Top = 360
Width = 1335
End
Begin VB.Label Label8
Caption = "備注"
Height = 375
Left = 240
TabIndex = 11
Top = 1920
Width = 1335
End
Begin VB.Label Label6
Caption = "購票價格"
Height = 255
Left = 240
TabIndex = 10
Top = 1440
Width = 855
End
Begin VB.Label Label5
Caption = "到達城市"
Height = 375
Left = 3120
TabIndex = 8
Top = 720
Width = 1335
End
Begin VB.Label Label4
Caption = "購票時間"
Height = 255
Left = 3120
TabIndex = 7
Top = 1080
Width = 975
End
Begin VB.Label Label3
Caption = "購票日期"
Height = 375
Left = 240
TabIndex = 5
Top = 1080
Width = 1335
End
Begin VB.Label Label2
Caption = "起始城市"
Height = 375
Left = 240
TabIndex = 3
Top = 720
Width = 1335
End
Begin VB.Label labelx
Caption = "汽車編號"
Height = 375
Left = 3120
TabIndex = 1
Top = 360
Width = 1335
End
End
End
Attribute VB_Name = "frm_addticketinfo"
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 ticketinfo where ticketno='" + Trim(ticketNO.Text) + "'"
objRS.Open strSQL, objConn, 1, 3
If objRS.EOF Then
objRS.AddNew
objRS.Fields(0).Value = ticketNO.Text
objRS.Fields(1).Value = busno.Text
objRS.Fields(2).Value = departcity.Text
objRS.Fields(3).Value = arrivalcity.Text
objRS.Fields(4).Value = ticketdate.Text
objRS.Fields(5).Value = tickettime.Text
objRS.Fields(6).Value = CDbl(price.Text)
objRS.Fields(7).Value = memo.Text
objRS.Update
objRS.Close
CloseDB
MsgBox "記錄已添加", vbOKOnly
frm_ticket.FGridDatatable.Clear
frm_ticket.ShowTitle
frm_ticket.loadData ("")
Unload Me
frm_ticket.Show
Else
MsgBox "車票編號已存在", vbOKOnly
objRS.Close
CloseDB
ticketNO.SetFocus
End If
End Sub
Private Sub fault_Click()
Unload Me
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -