📄 form4.frm
字号:
VERSION 5.00
Begin VB.Form Form4
Caption = "特殊线路资料"
ClientHeight = 6900
ClientLeft = 60
ClientTop = 450
ClientWidth = 4935
LinkTopic = "Form4"
Picture = "Form4.frx":0000
ScaleHeight = 6900
ScaleWidth = 4935
StartUpPosition = 3 '窗口缺省
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "要查看下条信息请先关闭此窗口"
BeginProperty Font
Name = "楷体_GB2312"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 1
Top = 240
Width = 4455
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "Label1"
Height = 5775
Left = 120
TabIndex = 0
Top = 960
Width = 4695
End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim cnn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim a(20), jiehe(10), b, asd
Private Sub Form_Load()
Label2.Visible = False
asd = 0
Set cnn = New ADODB.Connection
strcnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\db1.mdb;Persist Security Info=False"
cnn.Open strcnn
Set rs = New ADODB.Recordset
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
rs.Open "teshu", cnn, , , adCmdTable
zx = Form1.Text8.Text
jiehe(0) = "路车资料:" + Chr(13) + Chr(10)
rs.MoveFirst
Do While Not rs.EOF
If rs.Fields("车号") = zx Then
a(0) = rs.Fields("线路")
a(1) = rs.Fields("车号")
a(2) = rs.Fields("类型")
a(3) = rs.Fields("票价")
a(4) = rs.Fields("行车路线")
jiehe(1) = " 线 路 : " + a(0) + Chr(13) + Chr(10) + " 车 号 : " + a(1) + Chr(13) + Chr(10) + " 类 型 : " + a(2) + Chr(13) + Chr(10) + " 票 价 : " + a(3) + Chr(13) + Chr(10) + " 行车路线 : " + a(4)
Label1.Caption = a(0) + Chr(13) + Chr(10) + a(1) + jiehe(0) + Chr(13) + Chr(10) + jiehe(1)
b = a(0)
End If
rs.MoveNext
Loop
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -