📄 pzk.frm
字号:
Top = 0
Width = 7095
End
Begin VB.Line Line1
BorderColor = &H00FF8080&
BorderWidth = 3
X1 = 240.516
X2 = 6974.968
Y1 = 841.295
Y2 = 841.295
End
Begin VB.Label Label2
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "皮重库查询维护"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 840
TabIndex = 9
Top = 240
Width = 4095
End
Begin VB.Label Label1
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 1 'Fixed Single
Caption = "输入车号"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 375
Left = 480
TabIndex = 7
Top = 1200
Width = 1215
End
End
Attribute VB_Name = "pzk"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'CODE Manger By BcodeXRose
Dim pru As Boolean
'##################################################################
'## 过程名称:Command1_Click
'## 参数: 无
'##################################################################
Private Sub Command1_Click()
On Error Resume Next
Dim ds As Recordset
Dim rs, cs As Integer
Dim sll As Long
'Set ds = datPrimaryRS.Recordset
If Text1.text = "" Then
MsgBox "请选择车号在打印"
Text1.SetFocus
Exit Sub
End If
rs = datPrimaryRS.Recordset.RecordCount
cs = datPrimaryRS.Recordset.Fields.Count
'printer.Print rs, cs
Printer.FontSize = 14
Printer.FontUnderline = True
Printer.Print Tab(18); "皮重库表"
'printer.Show
Printer.Print
'printer.Print
Printer.Print String(80, "━")
Printer.FontSize = 10
Printer.FontUnderline = False
For j = 0 To rs
For i = 0 To cs
DataGrid1.Row = j
DataGrid1.Col = i
'DataGrid1.Text = i
'DataGrid1.ColWidth = 20
Printer.Print Tab(i * 10 + 15); DataGrid1.text;
'sll = sll + Val(DataGrid1.Text)
Next i
Printer.Print
Printer.Print String(80, "━")
Next j
'
Printer.EndDoc
End Sub
'##################################################################
'## 过程名称:Form_Load
'## 参数: 无
'##################################################################
Private Sub Form_Load()
'Text1.SetFocus
End Sub
'##################################################################
'## 过程名称:Form_Unload
'## 参数:Cancel 为Integer型
'##################################################################
Private Sub Form_Unload(Cancel As Integer)
'Screen.MousePointer = vbDefault
End Sub
'##################################################################
'## 过程名称:datPrimaryRS_Error
'## 参数:ByVal 为orNumber As Long型
'## 参数:Description 为String型
'## 参数:ByVal 为de As Long型
'## 参数:ByVal 为rce As String型
'## 参数:ByVal 为pFile As String型
'## 参数:ByVal 为pContext As Long型
'## 参数:fCancelDisplay 为Boolean型
'##################################################################
Private Sub datPrimaryRS_Error(ByVal ErrorNumber As Long, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, fCancelDisplay As Boolean)
'错误处理程序代码置于此处
'想要忽略错误,注释掉下一行
'想要捕获它们,在此添加代码以处理它们
MsgBox "Data error event hit err:" & Description
End Sub
'##################################################################
'## 过程名称:datPrimaryRS_MoveComplete
'## 参数:ByVal 为eason As ADODB.EventReasonEnum型
'## 参数:ByVal 为ror As ADODB.Error型
'## 参数:adStatus 为ADODB.EventStatusEnum型
'## 参数:ByVal 为cordset As ADODB.Recordset型
'##################################################################
Private Sub datPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
'为这个 recordset 显示当前记录位置
datPrimaryRS.Caption = "Record: " & CStr(datPrimaryRS.Recordset.AbsolutePosition)
End Sub
'##################################################################
'## 过程名称:datPrimaryRS_WillChangeRecord
'## 参数:ByVal 为eason As ADODB.EventReasonEnum型
'## 参数:ByVal 为cords As Long型
'## 参数:adStatus 为ADODB.EventStatusEnum型
'## 参数:ByVal 为cordset As ADODB.Recordset型
'##################################################################
Private Sub datPrimaryRS_WillChangeRecord(ByVal adReason As ADODB.EventReasonEnum, ByVal cRecords As Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
'验证代码置于此处
'下列动作发生时该事件被调用
Dim bCancel As Boolean
Select Case adReason
Case adRsnAddNew
Case adRsnClose
Case adRsnDelete
Case adRsnFirstChange
Case adRsnMove
Case adRsnRequery
Case adRsnResynch
Case adRsnUndoAddNew
Case adRsnUndoDelete
Case adRsnUndoUpdate
Case adRsnUpdate
End Select
If bCancel Then adStatus = adStatusCancel
End Sub
'##################################################################
'## 过程名称:cmdAdd_Click
'## 参数: 无
'##################################################################
Private Sub cmdAdd_Click()
On Error GoTo AddErr
datPrimaryRS.Recordset.AddNew
Exit Sub
AddErr:
MsgBox err.Description
End Sub
'##################################################################
'## 过程名称:cmdDelete_Click
'## 参数: 无
'##################################################################
Private Sub cmdDelete_Click()
On Error GoTo DeleteErr
With datPrimaryRS.Recordset
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
Exit Sub
DeleteErr:
MsgBox err.Description
End Sub
'##################################################################
'## 过程名称:cmdRefresh_Click
'## 参数: 无
'##################################################################
Private Sub cmdRefresh_Click()
'只有多用户应用程序需要
On Error GoTo RefreshErr
datPrimaryRS.Refresh
Exit Sub
RefreshErr:
MsgBox err.Description
End Sub
'##################################################################
'## 过程名称:cmdUpdate_Click
'## 参数: 无
'##################################################################
Private Sub cmdUpdate_Click()
On Error GoTo UpdateErr
datPrimaryRS.Recordset.UpdateBatch adAffectAll
Exit Sub
UpdateErr:
MsgBox err.Description
End Sub
'##################################################################
'## 过程名称:cmdClose_Click
'## 参数: 无
'##################################################################
Private Sub cmdClose_Click()
Unload Me
End Sub
'##################################################################
'## 过程名称:Text1_Change
'## 参数: 无
'##################################################################
Private Sub Text1_Change()
Dim dar As String
dar = Text1.text
datPrimaryRS.RecordSource = "select ch as 车号,pz as 皮重,sj as 时间,slh as 流水号 from kck where ch like'" & dar & "%'"
datPrimaryRS.Refresh
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -