📄 frm_qgzr_lr.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form Frm_qgzr_lr
BorderStyle = 1 'Fixed Single
Caption = "录入发布信息"
ClientHeight = 3030
ClientLeft = 45
ClientTop = 330
ClientWidth = 5400
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
ScaleHeight = 3030
ScaleWidth = 5400
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text1
Height = 360
Index = 5
Left = 3660
TabIndex = 17
Text = "Text1"
Top = 1950
Width = 1560
End
Begin VB.TextBox Text1
Height = 360
Index = 4
Left = 1035
TabIndex = 16
Text = "Text1"
Top = 1920
Width = 1560
End
Begin VB.TextBox Text1
Height = 360
Index = 3
Left = 3660
TabIndex = 15
Text = "Text1"
Top = 1335
Width = 1560
End
Begin VB.TextBox Text1
Height = 360
Index = 2
Left = 1035
TabIndex = 14
Text = "Text1"
Top = 1410
Width = 1560
End
Begin VB.TextBox Text1
Height = 360
Index = 1
Left = 3660
TabIndex = 13
Text = "Text1"
Top = 705
Width = 1560
End
Begin VB.TextBox Text1
Height = 360
Index = 0
Left = 1035
TabIndex = 12
Text = "Text1"
Top = 810
Width = 1560
End
Begin MSComCtl2.DTPicker DTP1
Height = 345
Left = 3645
TabIndex = 6
Top = 195
Width = 1515
_ExtentX = 2672
_ExtentY = 609
_Version = 393216
Format = 69533697
CurrentDate = 39436
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "Frm_qgzr_lr.frx":0000
Left = 1035
List = "Frm_qgzr_lr.frx":000A
TabIndex = 3
Text = "请选择方式"
Top = 240
Width = 1305
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 3900
TabIndex = 2
Top = 2595
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "发布"
Height = 375
Left = 2580
TabIndex = 1
Top = 2580
Width = 1095
End
Begin VB.Label Label8
Caption = "备 注"
Height = 300
Left = 2760
TabIndex = 11
Top = 2055
Width = 855
End
Begin VB.Label Label7
Caption = "联系人"
Height = 315
Left = 210
TabIndex = 10
Top = 1920
Width = 600
End
Begin VB.Label Label6
Caption = "联系电话"
Height = 330
Left = 2760
TabIndex = 9
Top = 1455
Width = 975
End
Begin VB.Label Label5
Caption = "乘坐类型"
Height = 405
Left = 210
TabIndex = 8
Top = 1425
Width = 810
End
Begin VB.Label Label4
Caption = "站 点"
Height = 330
Left = 2760
TabIndex = 7
Top = 825
Width = 735
End
Begin VB.Label Label3
Caption = "车 种"
Height = 330
Left = 210
TabIndex = 5
Top = 870
Width = 705
End
Begin VB.Label Label2
Caption = "日 期"
Height = 330
Left = 2760
TabIndex = 4
Top = 240
Width = 720
End
Begin VB.Label Label1
Caption = "方 式"
Height = 345
Left = 210
TabIndex = 0
Top = 255
Width = 540
End
End
Attribute VB_Name = "Frm_qgzr_lr"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As New ADODB.Recordset
Dim i As Integer
Private Sub Command1_Click()
If Text1(1).Text = "" Or Text1(3).Text = "" Then
MsgBox "请输入完整信息!", , "学生订票管理系统"
Exit Sub
End If
rs.Open "select * from tb_qgzr", cnn, adOpenKeyset, adLockOptimistic
rs.AddNew
rs.Fields(0) = Combo1.Text
rs.Fields(1) = DTP1.Value
For i = 0 To 5
rs.Fields(i + 2) = Text1(i).Text
Next i
rs.Update
MsgBox "消息发布成功!", , "学生订票管理系统"
rs.Close
For i = 0 To 5
Text1(i).Text = ""
Next i
End Sub
Private Sub Command2_Click()
Unload Me
Frm_qgzr.Show 1
End Sub
Private Sub Form_Load()
DTP1.Value = Date
For i = 0 To 5
Text1(i).Text = ""
Next i
End Sub
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then DTP1.SetFocus '按回车键Combo2获得焦点
End Sub
Private Sub DTP1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Text1(0).SetFocus '按回车键Combo2获得焦点
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -