Form2.frm
上传用户:salesll
上传日期:2014-07-25
资源大小:2665k
文件大小:6k
源码类别:

交通/航空行业

开发平台:

Others

  1. VERSION 5.00
  2. Begin VB.Form Form2 
  3.    BackColor       =   &H00008080&
  4.    Caption         =   "车辆档案管理添加"
  5.    ClientHeight    =   7350
  6.    ClientLeft      =   60
  7.    ClientTop       =   420
  8.    ClientWidth     =   7875
  9.    BeginProperty Font 
  10.       Name            =   "宋体"
  11.       Size            =   12
  12.       Charset         =   134
  13.       Weight          =   700
  14.       Underline       =   0   'False
  15.       Italic          =   0   'False
  16.       Strikethrough   =   0   'False
  17.    EndProperty
  18.    LinkTopic       =   "Form2"
  19.    ScaleHeight     =   7350
  20.    ScaleWidth      =   7875
  21.    StartUpPosition =   2  '屏幕中心
  22.    Begin VB.TextBox Text5 
  23.       Height          =   615
  24.       Left            =   2520
  25.       TabIndex        =   11
  26.       Top             =   4560
  27.       Width           =   4455
  28.    End
  29.    Begin VB.TextBox Text4 
  30.       Height          =   615
  31.       Left            =   2520
  32.       TabIndex        =   10
  33.       Top             =   3480
  34.       Width           =   4455
  35.    End
  36.    Begin VB.TextBox Text3 
  37.       Height          =   615
  38.       Left            =   2520
  39.       TabIndex        =   9
  40.       Top             =   2520
  41.       Width           =   4455
  42.    End
  43.    Begin VB.TextBox Text2 
  44.       Height          =   615
  45.       Left            =   2520
  46.       TabIndex        =   8
  47.       Top             =   1440
  48.       Width           =   4455
  49.    End
  50.    Begin VB.TextBox Text1 
  51.       Height          =   615
  52.       Left            =   2520
  53.       TabIndex        =   3
  54.       Top             =   480
  55.       Width           =   4455
  56.    End
  57.    Begin VB.CommandButton Command2 
  58.       Caption         =   "取消"
  59.       BeginProperty Font 
  60.          Name            =   "宋体"
  61.          Size            =   9
  62.          Charset         =   134
  63.          Weight          =   400
  64.          Underline       =   0   'False
  65.          Italic          =   0   'False
  66.          Strikethrough   =   0   'False
  67.       EndProperty
  68.       Height          =   615
  69.       Left            =   4680
  70.       TabIndex        =   1
  71.       Top             =   6240
  72.       Width           =   2415
  73.    End
  74.    Begin VB.CommandButton Command1 
  75.       Caption         =   "添加"
  76.       BeginProperty Font 
  77.          Name            =   "宋体"
  78.          Size            =   9
  79.          Charset         =   134
  80.          Weight          =   400
  81.          Underline       =   0   'False
  82.          Italic          =   0   'False
  83.          Strikethrough   =   0   'False
  84.       EndProperty
  85.       Height          =   615
  86.       Left            =   360
  87.       TabIndex        =   0
  88.       Top             =   6240
  89.       Width           =   2535
  90.    End
  91.    Begin VB.Label Label5 
  92.       BackColor       =   &H00008080&
  93.       Caption         =   "车辆所在单位:"
  94.       BeginProperty Font 
  95.          Name            =   "宋体"
  96.          Size            =   18
  97.          Charset         =   134
  98.          Weight          =   700
  99.          Underline       =   0   'False
  100.          Italic          =   0   'False
  101.          Strikethrough   =   0   'False
  102.       EndProperty
  103.       Height          =   735
  104.       Left            =   0
  105.       TabIndex        =   7
  106.       Top             =   4680
  107.       Width           =   2655
  108.    End
  109.    Begin VB.Label Label4 
  110.       BackColor       =   &H00008080&
  111.       Caption         =   "购买时间:"
  112.       BeginProperty Font 
  113.          Name            =   "宋体"
  114.          Size            =   18
  115.          Charset         =   134
  116.          Weight          =   700
  117.          Underline       =   0   'False
  118.          Italic          =   0   'False
  119.          Strikethrough   =   0   'False
  120.       EndProperty
  121.       Height          =   735
  122.       Left            =   120
  123.       TabIndex        =   6
  124.       Top             =   3480
  125.       Width           =   2295
  126.    End
  127.    Begin VB.Label Label3 
  128.       BackColor       =   &H00008080&
  129.       Caption         =   "车辆类型:"
  130.       BeginProperty Font 
  131.          Name            =   "宋体"
  132.          Size            =   18
  133.          Charset         =   134
  134.          Weight          =   700
  135.          Underline       =   0   'False
  136.          Italic          =   0   'False
  137.          Strikethrough   =   0   'False
  138.       EndProperty
  139.       Height          =   735
  140.       Left            =   120
  141.       TabIndex        =   5
  142.       Top             =   2520
  143.       Width           =   2295
  144.    End
  145.    Begin VB.Label Label2 
  146.       BackColor       =   &H00008080&
  147.       Caption         =   "驾驶员编号:"
  148.       BeginProperty Font 
  149.          Name            =   "宋体"
  150.          Size            =   18
  151.          Charset         =   134
  152.          Weight          =   700
  153.          Underline       =   0   'False
  154.          Italic          =   0   'False
  155.          Strikethrough   =   0   'False
  156.       EndProperty
  157.       Height          =   735
  158.       Left            =   120
  159.       TabIndex        =   4
  160.       Top             =   1440
  161.       Width           =   2295
  162.    End
  163.    Begin VB.Label Label1 
  164.       BackColor       =   &H00008080&
  165.       Caption         =   "车牌号码:"
  166.       BeginProperty Font 
  167.          Name            =   "宋体"
  168.          Size            =   18
  169.          Charset         =   134
  170.          Weight          =   700
  171.          Underline       =   0   'False
  172.          Italic          =   0   'False
  173.          Strikethrough   =   0   'False
  174.       EndProperty
  175.       Height          =   615
  176.       Left            =   240
  177.       TabIndex        =   2
  178.       Top             =   480
  179.       Width           =   1935
  180.    End
  181. End
  182. Attribute VB_Name = "Form2"
  183. Attribute VB_GlobalNameSpace = False
  184. Attribute VB_Creatable = False
  185. Attribute VB_PredeclaredId = True
  186. Attribute VB_Exposed = False
  187. Private Sub Command1_Click()
  188.   Dim rs As ADODB.Command
  189.   Dim str As String
  190.   Call open_db
  191.   str = "insert into 车辆档案(车牌号码,驾驶员编号,车辆类型,购买时间,车辆所在单位)"
  192.   str = str & "Values('" & Text1 & "','" & Text2 & "','" & Text3 & "','" & Text4 & "','" & Text5 & "')"
  193.   Set rs = New ADODB.Command
  194.   Set rs.ActiveConnection = adocon
  195.   rs.CommandText = str
  196.   rs.Execute
  197.   Set rs = Nothing
  198.   adocon.Close
  199.   Set adocon = Nothing
  200.   Call close_db
  201.   MsgBox "添加成功!", , vbOKOnly
  202. End Sub
  203. Private Sub Command2_Click()
  204.    Unload Me
  205. End Sub