📄 发车日期.frm
字号:
VERSION 5.00
Begin VB.Form 发车日期
BorderStyle = 1 'Fixed Single
Caption = "发车日期"
ClientHeight = 3855
ClientLeft = 2205
ClientTop = 2220
ClientWidth = 7785
ClipControls = 0 'False
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Moveable = 0 'False
ScaleHeight = 3855
ScaleWidth = 7785
Begin VB.TextBox Text3
DataField = "车次"
DataSource = "Data1"
Height = 375
Left = 4440
TabIndex = 29
Text = "Text3"
Top = 5010
Width = 1665
End
Begin VB.TextBox Text2
DataField = "班组"
DataSource = "Data1"
Height = 315
Left = 2700
TabIndex = 28
Text = "Text2"
Top = 5010
Width = 1425
End
Begin VB.Frame Frame3
Caption = "今天日期"
Height = 975
Left = 210
TabIndex = 23
Top = 630
Width = 3465
Begin VB.TextBox Text9
Alignment = 1 'Right Justify
Height = 270
Left = 2370
TabIndex = 26
Text = "Text9"
Top = 420
Width = 525
End
Begin VB.TextBox Text8
Alignment = 1 'Right Justify
Height = 270
Left = 1320
TabIndex = 25
Text = "Text8"
Top = 420
Width = 585
End
Begin VB.TextBox Text7
Alignment = 1 'Right Justify
Height = 270
Left = 210
TabIndex = 24
Text = "Text7"
Top = 420
Width = 615
End
Begin VB.Label Label2
Caption = "年 月 日"
Height = 255
Left = 960
TabIndex = 27
Top = 450
Width = 2265
End
End
Begin VB.CommandButton Command1
Caption = "日期确认"
Height = 315
Left = 6270
TabIndex = 22
Top = 1920
Width = 1035
End
Begin VB.TextBox Text1
DataField = "发车日期"
DataSource = "Data1"
Height = 315
Left = 780
TabIndex = 18
Text = "Text1"
Top = 5040
Width = 1425
End
Begin VB.CommandButton Command3
Caption = "重新输入"
Height = 315
Left = 6270
TabIndex = 9
Top = 2700
Width = 1035
End
Begin VB.CommandButton Command2
Caption = "取 消"
Height = 315
Left = 6270
TabIndex = 8
Top = 2310
Width = 1035
End
Begin VB.CommandButton Command4
Caption = "确 认"
Enabled = 0 'False
Height = 315
Left = 6270
TabIndex = 7
Top = 3090
Width = 1035
End
Begin VB.Frame Frame2
Caption = "班组选择"
Enabled = 0 'False
Height = 1605
Left = 210
TabIndex = 6
Top = 1800
Width = 5685
Begin VB.OptionButton Option8
Caption = "第八组"
Enabled = 0 'False
Height = 315
Left = 4320
TabIndex = 17
Top = 990
Width = 945
End
Begin VB.OptionButton Option7
Caption = "第七组"
Enabled = 0 'False
Height = 315
Left = 3030
TabIndex = 16
Top = 990
Width = 945
End
Begin VB.OptionButton Option6
Caption = "第六组"
Enabled = 0 'False
Height = 315
Left = 1720
TabIndex = 15
Top = 990
Width = 945
End
Begin VB.OptionButton Option5
Caption = "第五组"
Enabled = 0 'False
Height = 315
Left = 420
TabIndex = 14
Top = 990
Width = 945
End
Begin VB.OptionButton Option4
Caption = "第四组"
Enabled = 0 'False
Height = 315
Left = 4320
TabIndex = 13
Top = 330
Width = 1245
End
Begin VB.OptionButton Option3
Caption = "第三组"
Enabled = 0 'False
Height = 255
Left = 3020
TabIndex = 12
Top = 330
Width = 1245
End
Begin VB.OptionButton Option2
Caption = "第二组"
Enabled = 0 'False
Height = 255
Left = 1720
TabIndex = 11
Top = 330
Width = 1245
End
Begin VB.OptionButton Option1
Caption = "第一组"
Enabled = 0 'False
Height = 285
Left = 420
TabIndex = 10
Top = 330
Width = 1245
End
End
Begin VB.Timer Timer1
Interval = 1000
Left = 7140
Top = 180
End
Begin VB.Frame Frame1
Caption = "发车日期 "
Height = 975
Left = 3810
TabIndex = 1
Top = 630
Width = 3795
Begin VB.VScrollBar VScroll3
Height = 315
Left = 3045
Max = 1
Min = 31
TabIndex = 21
Top = 375
Value = 1
Width = 195
End
Begin VB.VScrollBar VScroll2
Height = 315
Left = 2115
Max = 1
Min = 12
TabIndex = 20
Top = 375
Value = 1
Width = 195
End
Begin VB.VScrollBar VScroll1
Height = 315
Left = 1035
Max = 1999
Min = 3000
TabIndex = 19
Top = 375
Value = 1999
Width = 195
End
Begin VB.TextBox Text6
Alignment = 1 'Right Justify
Height = 270
Left = 2655
TabIndex = 3
Top = 405
Width = 375
End
Begin VB.TextBox Text5
Alignment = 1 'Right Justify
Height = 270
Left = 1665
TabIndex = 2
Top = 405
Width = 435
End
Begin VB.TextBox Text4
Alignment = 1 'Right Justify
Height = 270
Left = 285
TabIndex = 0
Top = 420
Width = 735
End
Begin VB.Label Label4
Caption = "年 月 日"
Height = 285
Left = 1380
TabIndex = 4
Top = 435
Width = 2205
End
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 345
Left = 660
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "日期车次"
Top = 4380
Width = 2385
End
Begin VB.Label Label1
Caption = "请输入本次列车的发车日期和运行班组"
BeginProperty Font
Name = "华文新魏"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 465
Left = 600
TabIndex = 5
Top = 180
Width = 6465
End
End
Attribute VB_Name = "发车日期"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Result As Integer, T7 As String, CC As String, Rx1 As String, Rx2 As String
Dim Cxtj1 As String, Cxtj2 As String, Cxtj3 As String, Cxs As String
Dim Falg As Integer
Public Datedata As String
Private Sub Form_Load()
'On Error Resume Next
Text7 = Date
Data1.DatabaseName = App.Path + "\" + "原始记录.mdb"
Data1.Connect = ";pwd=aaa"
Data1.Refresh
Text7 = Format(Date, "yyyy"): Text8 = Format(Date, "m"): Text9 = Format(Date, "d")
Rx1 = Date - 4
Text4 = Format(Rx1, "yyyy"): Text5 = Format(Rx1, "m"): Text6 = Format(Rx1, "d")
Rx1 = Text4 + "年" + Text5 + "月" + Text6 + "日"
Rx2 = Format(CDate(Rx1) - 3, "yyyy年m月d日")
VScroll1.Value = Val(Text4): VScroll2.Value = Val(Text5): VScroll3.Value = Val(Text6)
Cxtj1 = "发车日期": Cxtj2 = "班组": Cxtj3 = "车次": CC = "238"
Falg = 0
End Sub
Private Sub Command1_Click()
Cxtj1 = "发车日期"
Cxs = "[" + Cxtj1 + "]" + "=" + "'" + Rx1 + "'"
Data1.RecordSource = "Select * from 日期车次 where" & Cxs
Data1.Refresh
If Text1 = Rx1 And Text3 = CC Then
Result = MsgBox(" 已有该日记录,是否更新数据 ! ", vbExclamation + vbOKCancel, "提示信息")
Debug.Print Result
If Result = 1 Then
Falg = 1
End If
End If
Call X2
End Sub
Private Sub Command2_Click()
工作选项.Enabled = True
Timer1.Enabled = False
Unload Me
End Sub
Private Sub Command3_Click()
Text4 = "": Text5 = "": Text6 = ""
Text5.BackColor = &H80000001: Text6.BackColor = &H80000001
Text4.SetFocus
End Sub
Private Sub Command4_Click()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -