Form2.frm
资源名称:2005.rar [点击查看]
上传用户:salesll
上传日期:2014-07-25
资源大小:2665k
文件大小:6k
源码类别:
交通/航空行业
开发平台:
Others
- VERSION 5.00
- Begin VB.Form Form2
- BackColor = &H00008080&
- Caption = "车辆档案管理添加"
- ClientHeight = 7350
- ClientLeft = 60
- ClientTop = 420
- ClientWidth = 7875
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- LinkTopic = "Form2"
- ScaleHeight = 7350
- ScaleWidth = 7875
- StartUpPosition = 2 '屏幕中心
- Begin VB.TextBox Text5
- Height = 615
- Left = 2520
- TabIndex = 11
- Top = 4560
- Width = 4455
- End
- Begin VB.TextBox Text4
- Height = 615
- Left = 2520
- TabIndex = 10
- Top = 3480
- Width = 4455
- End
- Begin VB.TextBox Text3
- Height = 615
- Left = 2520
- TabIndex = 9
- Top = 2520
- Width = 4455
- End
- Begin VB.TextBox Text2
- Height = 615
- Left = 2520
- TabIndex = 8
- Top = 1440
- Width = 4455
- End
- Begin VB.TextBox Text1
- Height = 615
- Left = 2520
- TabIndex = 3
- Top = 480
- Width = 4455
- End
- Begin VB.CommandButton Command2
- Caption = "取消"
- BeginProperty Font
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 615
- Left = 4680
- TabIndex = 1
- Top = 6240
- Width = 2415
- End
- Begin VB.CommandButton Command1
- Caption = "添加"
- BeginProperty Font
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 615
- Left = 360
- TabIndex = 0
- Top = 6240
- Width = 2535
- End
- Begin VB.Label Label5
- BackColor = &H00008080&
- Caption = "车辆所在单位:"
- BeginProperty Font
- Name = "宋体"
- Size = 18
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 735
- Left = 0
- TabIndex = 7
- Top = 4680
- Width = 2655
- End
- Begin VB.Label Label4
- BackColor = &H00008080&
- Caption = "购买时间:"
- BeginProperty Font
- Name = "宋体"
- Size = 18
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 735
- Left = 120
- TabIndex = 6
- Top = 3480
- Width = 2295
- End
- Begin VB.Label Label3
- BackColor = &H00008080&
- Caption = "车辆类型:"
- BeginProperty Font
- Name = "宋体"
- Size = 18
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 735
- Left = 120
- TabIndex = 5
- Top = 2520
- Width = 2295
- End
- Begin VB.Label Label2
- BackColor = &H00008080&
- Caption = "驾驶员编号:"
- BeginProperty Font
- Name = "宋体"
- Size = 18
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 735
- Left = 120
- TabIndex = 4
- Top = 1440
- Width = 2295
- End
- Begin VB.Label Label1
- BackColor = &H00008080&
- Caption = "车牌号码:"
- BeginProperty Font
- Name = "宋体"
- Size = 18
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 615
- Left = 240
- TabIndex = 2
- Top = 480
- Width = 1935
- End
- End
- Attribute VB_Name = "Form2"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- Dim rs As ADODB.Command
- Dim str As String
- Call open_db
- str = "insert into 车辆档案(车牌号码,驾驶员编号,车辆类型,购买时间,车辆所在单位)"
- str = str & "Values('" & Text1 & "','" & Text2 & "','" & Text3 & "','" & Text4 & "','" & Text5 & "')"
- Set rs = New ADODB.Command
- Set rs.ActiveConnection = adocon
- rs.CommandText = str
- rs.Execute
- Set rs = Nothing
- adocon.Close
- Set adocon = Nothing
- Call close_db
- MsgBox "添加成功!", , vbOKOnly
- End Sub
- Private Sub Command2_Click()
- Unload Me
- End Sub