📄 form6.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form6
BackColor = &H008080FF&
Caption = "车辆运营查询修改"
ClientHeight = 3465
ClientLeft = 60
ClientTop = 420
ClientWidth = 7470
LinkTopic = "Form6"
ScaleHeight = 3465
ScaleWidth = 7470
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc1
Height = 495
Left = 240
Top = 2880
Width = 1695
_ExtentX = 2990
_ExtentY = 873
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 3
Appearance = 1
BackColor = 8421631
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=cheliang"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "cheliang"
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "车辆档案"
Caption = "查询"
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.TextBox Text5
DataField = "使用单位或人"
DataSource = "Adodc1"
Height = 495
Left = 1200
TabIndex = 11
Top = 2040
Width = 5775
End
Begin VB.CommandButton Command3
Caption = "取消"
Height = 495
Left = 5280
TabIndex = 9
Top = 2880
Width = 1695
End
Begin VB.CommandButton Command2
Caption = "修改"
Height = 495
Left = 2640
TabIndex = 8
Top = 2880
Width = 1575
End
Begin VB.TextBox Text4
DataField = "运营收入"
DataSource = "Adodc1"
Height = 495
Left = 4560
TabIndex = 7
Top = 1200
Width = 2415
End
Begin VB.TextBox Text3
DataField = "运营时间"
DataSource = "Adodc1"
Height = 495
Left = 4560
TabIndex = 6
Top = 360
Width = 2415
End
Begin VB.TextBox Text2
DataField = "运营日期"
DataSource = "Adodc1"
Height = 495
Left = 1200
TabIndex = 5
Top = 1200
Width = 2175
End
Begin VB.TextBox Text1
DataField = "车牌号码"
DataSource = "Adodc1"
Height = 495
Left = 1200
TabIndex = 4
Top = 360
Width = 2175
End
Begin VB.Label Label5
BackColor = &H008080FF&
Caption = "使用单位:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 120
TabIndex = 10
Top = 2040
Width = 1215
End
Begin VB.Label Label4
BackColor = &H008080FF&
Caption = "运营收入:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3480
TabIndex = 3
Top = 1200
Width = 1215
End
Begin VB.Label Label3
BackColor = &H008080FF&
Caption = "运营时间:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3480
TabIndex = 2
Top = 360
Width = 1215
End
Begin VB.Label Label2
BackColor = &H008080FF&
Caption = "运营日期:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 120
TabIndex = 1
Top = 1320
Width = 1215
End
Begin VB.Label Label1
BackColor = &H008080FF&
Caption = "车牌号码:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 120
TabIndex = 0
Top = 360
Width = 1215
End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command2_Click()
Dim rs As ADODB.Command
Dim str As String
Set rs = New ADODB.Command
Call open_db
str = "update 车辆档案 set 车牌号码= '" & Text1 & "' ,运营日期='" & Text2 & "',运营时间='" & Text3 & "',运营收入='" & Text4 & "',使用单位或人='" & Text5 & "' where 车牌号码= '" & Text1 & "'"
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 Command3_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -