📄 frmfeipiao.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form FrmFeipiao
BorderStyle = 1 'Fixed Single
Caption = "作废票据"
ClientHeight = 4935
ClientLeft = 1695
ClientTop = 4560
ClientWidth = 6420
Icon = "FrmFeipiao.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4935
ScaleWidth = 6420
StartUpPosition = 2 '屏幕中心
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H80000004&
ForeColor = &H80000008&
Height = 2175
Left = 1440
ScaleHeight = 2145
ScaleWidth = 3225
TabIndex = 4
Top = 960
Visible = 0 'False
Width = 3255
Begin VB.CommandButton Command5
Caption = "取消"
Height = 375
Left = 1680
TabIndex = 10
Top = 1560
Width = 975
End
Begin VB.CommandButton Command4
Caption = "确定"
Height = 375
Left = 240
TabIndex = 9
Top = 1560
Width = 1095
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 300
Left = 1320
TabIndex = 8
Top = 840
Width = 1695
_ExtentX = 2990
_ExtentY = 529
_Version = 393216
Format = 24641537
CurrentDate = 37945
End
Begin VB.TextBox Text1
Height = 270
Left = 1320
TabIndex = 6
Top = 360
Width = 1695
End
Begin VB.Label Label2
Caption = "选择日期:"
Height = 255
Left = 240
TabIndex = 7
Top = 960
Width = 1215
End
Begin VB.Label Label1
Caption = "输入车号:"
Height = 255
Left = 240
TabIndex = 5
Top = 480
Width = 1095
End
End
Begin VB.CommandButton Command3
Caption = "取消操作"
Height = 375
Left = 3120
TabIndex = 3
Top = 4320
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "作废该票"
Height = 375
Left = 1680
TabIndex = 2
Top = 4320
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "查询票据"
Height = 375
Left = 240
TabIndex = 1
Top = 4320
Width = 1095
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 4560
Top = 4320
Visible = 0 'False
Width = 1215
_ExtentX = 2143
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
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 MSDataGridLib.DataGrid DataGrid1
Height = 3975
Left = 120
TabIndex = 0
Top = 120
Width = 6135
_ExtentX = 10821
_ExtentY = 7011
_Version = 393216
HeadLines = 1
RowHeight = 15
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 10
BeginProperty Column00
DataField = "车号"
Caption = "车号"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = "货物名称"
Caption = "货物名称"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column02
DataField = "单位"
Caption = "单位"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column03
DataField = "仓库"
Caption = "仓库"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column04
DataField = "毛重"
Caption = "毛重"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column05
DataField = "皮重"
Caption = "皮重"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column06
DataField = "净重"
Caption = "净重"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column07
DataField = "过磅员"
Caption = "过磅员"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column08
DataField = "日期"
Caption = "日期"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column09
DataField = "作废标志"
Caption = "作废标志"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
Locked = -1 'True
BeginProperty Column00
ColumnWidth = 1200.189
EndProperty
BeginProperty Column01
ColumnWidth = 1739.906
EndProperty
BeginProperty Column02
ColumnWidth = 1470.047
EndProperty
BeginProperty Column03
ColumnWidth = 1409.953
EndProperty
BeginProperty Column04
ColumnWidth = 989.858
EndProperty
BeginProperty Column05
ColumnWidth = 1035.213
EndProperty
BeginProperty Column06
ColumnWidth = 1200.189
EndProperty
BeginProperty Column07
EndProperty
BeginProperty Column08
ColumnWidth = 1755.213
EndProperty
BeginProperty Column09
ColumnWidth = 1365.165
EndProperty
EndProperty
End
End
Attribute VB_Name = "FrmFeipiao"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
On Error Resume Next
Picture1.Visible = True
End Sub
Private Sub Command2_Click()
On Error Resume Next
If DataGrid1.Row >= 0 Then
If MsgBox("你确实要作废该票据吗?一旦作废将无法恢复!", vbQuestion + vbYesNo, "提示!") = vbYes Then
Adodc1.Recordset!作废标志 = "是"
Adodc1.Recordset.Update
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
DataGrid1.Refresh
Adodc1.Refresh
End If
Else
MsgBox "没有要作废的票据!", vbInformation + vbOKOnly, "提示!"
End If
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Command4_Click()
On Error Resume Next
If Trim(Text1.Text) = "" Then
MsgBox "请输入要作废票的车号!", vbInformation, "提示!"
Exit Sub
End If
Adodc1.ConnectionString = Cn
Adodc1.RecordSource = "select 车号,货物名称,单位,仓库,毛重,皮重,净重,过磅员,日期,作废标志 from tb_wight where 车号='" & Trim(Text1.Text) & "' and 日期>= #" & DTPicker1.Value & "# and 日期<#" & DTPicker1.Value + 1 & "# and 作废标志<>'是'"
Adodc1.Refresh
If Adodc1.Recordset.EOF = True Then
MsgBox "你要查询的票据不存在!", vbInformation + vbOKOnly, "提示!"
Exit Sub
Else
Set DataGrid1.DataSource = Adodc1
Adodc1.Refresh
Picture1.Visible = False
End If
End Sub
Private Sub Command5_Click()
Picture1.Visible = False
End Sub
Private Sub Form_Load()
DTPicker1.Value = Date
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -