?? frm_zzrk_clgl_add.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frm_ZZRK_CLGL_ADD
BorderStyle = 3 'Fixed Dialog
Caption = "出租房車輛信息錄入"
ClientHeight = 5460
ClientLeft = 45
ClientTop = 330
ClientWidth = 6960
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5460
ScaleWidth = 6960
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 720
Top = 4920
Visible = 0 'False
Width = 2295
_ExtentX = 4048
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=RKGL"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=RKGL"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from Table_ZZRK_CLXX"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton Command3
Caption = "取消"
Height = 375
Left = 5640
TabIndex = 25
Top = 4920
Width = 975
End
Begin VB.CommandButton Cmd_save
Caption = "保存"
Height = 375
Left = 4560
TabIndex = 24
Top = 4920
Width = 975
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
ForeColor = &H00C000C0&
Height = 4695
Left = 120
TabIndex = 0
Top = 120
Width = 6735
Begin VB.TextBox Text11
Height = 300
Left = 1560
TabIndex = 26
Top = 360
Width = 2295
End
Begin VB.TextBox Text10
Height = 735
Left = 1560
TabIndex = 23
Top = 3720
Width = 4935
End
Begin VB.TextBox Text9
Height = 300
Left = 1560
TabIndex = 21
Top = 3240
Width = 4935
End
Begin VB.TextBox Text8
Height = 300
Left = 4800
TabIndex = 19
Top = 2760
Width = 1695
End
Begin VB.TextBox Text7
Height = 300
Left = 1560
TabIndex = 17
Top = 2760
Width = 2295
End
Begin VB.TextBox Text6
Height = 300
Left = 1560
TabIndex = 15
Top = 2280
Width = 4935
End
Begin VB.TextBox Text5
Height = 300
Left = 4800
TabIndex = 13
Top = 1800
Width = 1695
End
Begin VB.TextBox Text4
Height = 300
Left = 1560
TabIndex = 11
Top = 1800
Width = 2295
End
Begin VB.TextBox Text3
Height = 300
Left = 1560
TabIndex = 9
Top = 1320
Width = 4935
End
Begin VB.TextBox Text2
Height = 300
Left = 4800
TabIndex = 7
Top = 840
Width = 1695
End
Begin VB.TextBox Text1
Height = 300
Left = 1560
TabIndex = 5
Top = 840
Width = 2295
End
Begin VB.ComboBox Combo2
Height = 300
ItemData = "frm_ZZRK_CLGL_ADD.frx":0000
Left = 4800
List = "frm_ZZRK_CLGL_ADD.frx":0016
TabIndex = 3
Top = 360
Width = 1695
End
Begin VB.Label Label12
Caption = "備 注"
Height = 255
Left = 240
TabIndex = 22
Top = 3840
Width = 975
End
Begin VB.Label Label11
Caption = "駕駛證號"
Height = 375
Left = 240
TabIndex = 20
Top = 3360
Width = 1215
End
Begin VB.Label Label10
Caption = "聯系電話"
Height = 255
Left = 3960
TabIndex = 18
Top = 2880
Width = 975
End
Begin VB.Label Label9
Caption = "駕駛員姓名"
Height = 375
Left = 240
TabIndex = 16
Top = 2880
Width = 1455
End
Begin VB.Label Label8
Caption = "車主住址"
Height = 375
Left = 240
TabIndex = 14
Top = 2400
Width = 1215
End
Begin VB.Label Label7
Caption = "聯系電話"
Height = 495
Left = 3960
TabIndex = 12
Top = 1920
Width = 975
End
Begin VB.Label Label6
Caption = "車主姓名"
Height = 255
Left = 240
TabIndex = 10
Top = 1920
Width = 1215
End
Begin VB.Label Label5
Caption = "所屬出租房"
Height = 495
Left = 240
TabIndex = 8
Top = 1440
Width = 1335
End
Begin VB.Label Label4
Caption = "牌照號"
Height = 255
Left = 4080
TabIndex = 6
Top = 960
Width = 735
End
Begin VB.Label Label3
Caption = "發動機號"
Height = 375
Left = 240
TabIndex = 4
Top = 960
Width = 1095
End
Begin VB.Label Label2
Caption = "顏色"
Height = 255
Left = 4080
TabIndex = 2
Top = 480
Width = 495
End
Begin VB.Label Label1
Caption = "車輛類型"
Height = 255
Left = 240
TabIndex = 1
Top = 480
Width = 1215
End
End
End
Attribute VB_Name = "frm_ZZRK_CLGL_ADD"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmd_save_Click()
Call main
If Text9.Text = "" Then
MsgBox "輸入不能為空"
Else
Adodc1.RecordSource = "select * from Table_ZZRK_CLXX where 駕駛證號='" + Text9.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
MsgBox "此信息已經存在", 32, "人口信息管理系統"
Else
Set adoRs = adoCon.Execute("insert into Table_ZZRK_CLXX values(" & Text9 & ",'" & Text11 & "','" & Combo2 & "','" & Text1 & "','" & Text3 & "','" & Text4 & "','" & Text5 & "','" & Text6 & "','" & Text7 & "','" & Text8 & "','" & Text2 & "','" & Text10 & "')")
MsgBox "數據保存成功!", 32, "人口信息管理系統"
frm_ZZRK_CZFCLGL.Adodc1.Refresh
Call Txt_temp
End If
End If
adoCon.Close
End Sub
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo2.SetFocus
Else
End If
End Sub
Private Sub Combo2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text1.SetFocus
Else
End If
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text2.SetFocus
Else
End If
End Sub
Private Sub Text11_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo2.SetFocus
Else
End If
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text3.SetFocus
Else
End If
End Sub
Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text4.SetFocus
Else
End If
End Sub
Private Sub Text4_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text5.SetFocus
Else
End If
End Sub
Private Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text6.SetFocus
Else
End If
End Sub
Private Sub Text6_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text7.SetFocus
Else
End If
End Sub
Private Sub Text7_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text8.SetFocus
Else
End If
End Sub
Private Sub Text8_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text9.SetFocus
Else
End If
End Sub
Private Sub Text9_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Dim StrInput, Temp As String
Dim i, Length As Integer
i = 1
StrInput = Text9.Text
Length = Len(StrInput)
If Text9.Text = "" Then
MsgBox "輸入不能為空", , "提示"
Text9.SetFocus
Else
Do While (i <= Length)
Temp = Mid$(StrInput, i, 1)
If Asc(Temp) < 48 Or Asc(Temp) > 57 Then
If i = 1 Then
MsgBox "輸入數據非法!!", , "提示"
Else
End If
Text9.Text = ""
Text9.SetFocus
Else
End If
i = i + 1
Loop
If Text9.Text = "" Then
Text9.SetFocus
Else
Text10.SetFocus
End If
End If
Else
End If
End Sub
Private Sub Txt_temp()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Combo2.Text = ""
Text11.SetFocus
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -