📄 frm+
字号:
Charset = 134
Weight = 700
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 330
Left = 3435
TabIndex = 8
Top = 240
Width = 1725
End
Begin VB.Label Label17
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "NO."
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 8985
TabIndex = 7
Top = 240
Width = 375
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "姓 名"
Height = 180
Left = 7845
TabIndex = 6
Top = 4575
Width = 555
End
End
Begin VB.TextBox txtIamt2
Alignment = 1 'Right Justify
Appearance = 0 'Flat
BackColor = &H00FFFF80&
Height = 288
Left = 5385
Locked = -1 'True
TabIndex = 25
Top = 3510
Width = 1044
End
Begin MSComctlLib.StatusBar sb1
Align = 2 'Align Bottom
Height = 375
Left = 0
TabIndex = 13
Top = 6045
Width = 10845
_ExtentX = 19129
_ExtentY = 661
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 3
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 13944
Key = "状态信息"
Object.Tag = "IDmsg"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 6
TextSave = "01-4-13"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 5
TextSave = "14:23"
EndProperty
EndProperty
End
Begin Threed.SSPanel SSPanel1
Align = 1 'Align Top
Height = 555
Left = 0
TabIndex = 14
Top = 0
Width = 10845
_ExtentX = 19129
_ExtentY = 979
_Version = 131073
BorderWidth = 0
BevelInner = 1
Begin Threed.SSCommand cmdToolUnCommit
CausesValidation= 0 'False
Height = 465
Left = 1890
TabIndex = 33
Tag = "下一条"
ToolTipText = "打印单据"
Top = 15
Width = 930
_ExtentX = 1640
_ExtentY = 820
_Version = 131073
ForeColor = 0
Enabled = 0 'False
Caption = "弃审"
ButtonStyle = 3
BevelWidth = 0
End
Begin Threed.SSCommand cmdPrintBill
CausesValidation= 0 'False
Height = 465
Left = 7470
TabIndex = 23
Tag = "下一条"
ToolTipText = "打印单据"
Top = 15
Width = 930
_ExtentX = 1640
_ExtentY = 820
_Version = 131073
ForeColor = 0
Caption = "打印[&P]"
ButtonStyle = 3
BevelWidth = 0
End
Begin Threed.SSCommand cmdNew
CausesValidation= 0 'False
Height = 465
Left = 36
TabIndex = 22
Tag = "新建"
ToolTipText = "新建单据"
Top = 36
Width = 930
_ExtentX = 1640
_ExtentY = 820
_Version = 131073
ForeColor = 0
Caption = "新建[&N]"
ButtonStyle = 3
BevelWidth = 0
End
Begin Threed.SSCommand cmdVil
Height = 465
Left = 960
TabIndex = 21
Tag = "确认"
ToolTipText = "确认单据,使之生效"
Top = 15
Width = 930
_ExtentX = 1640
_ExtentY = 820
_Version = 131073
ForeColor = 0
Caption = "确认[&O]"
ButtonStyle = 3
BevelWidth = 0
End
Begin Threed.SSCommand cmdSave
Height = 465
Left = 2820
TabIndex = 20
Tag = "保存"
ToolTipText = "保存单据"
Top = 30
Width = 930
_ExtentX = 1640
_ExtentY = 820
_Version = 131073
ForeColor = 0
Caption = "保存[&S]"
ButtonStyle = 3
BevelWidth = 0
End
Begin Threed.SSCommand cmdDelete
CausesValidation= 0 'False
Height = 465
Left = 3750
TabIndex = 19
Tag = "删除"
ToolTipText = "删除当前单据"
Top = 30
Width = 930
_ExtentX = 1640
_ExtentY = 820
_Version = 131073
ForeColor = 0
Caption = "删除[&D]"
ButtonStyle = 3
BevelWidth = 0
End
Begin Threed.SSCommand cmdQuery
CausesValidation= 0 'False
Height = 465
Left = 4680
TabIndex = 18
Tag = "查询"
ToolTipText = "查询单据内容"
Top = 30
Width = 930
_ExtentX = 1640
_ExtentY = 820
_Version = 131073
ForeColor = 0
Caption = "查询[&Q]"
ButtonStyle = 3
BevelWidth = 0
End
Begin Threed.SSCommand cmdPrev
CausesValidation= 0 'False
Height = 465
Left = 5610
TabIndex = 17
Tag = "上一条"
ToolTipText = "翻至上一页"
Top = 30
Width = 930
_ExtentX = 1640
_ExtentY = 820
_Version = 131073
ForeColor = 0
Caption = "上一条[&U]"
ButtonStyle = 3
BevelWidth = 0
End
Begin Threed.SSCommand cmdNext
CausesValidation= 0 'False
Height = 465
Left = 6540
TabIndex = 16
Tag = "下一条"
ToolTipText = "翻至下一页"
Top = 30
Width = 930
_ExtentX = 1640
_ExtentY = 820
_Version = 131073
ForeColor = 0
Caption = "下一条[&M]"
ButtonStyle = 3
BevelWidth = 0
End
Begin Threed.SSCommand cmdExit
CausesValidation= 0 'False
Height = 465
Left = 9855
TabIndex = 15
Tag = "退出"
ToolTipText = "退出"
Top = 30
Width = 930
_ExtentX = 1640
_ExtentY = 820
_Version = 131073
ForeColor = 0
Caption = "退出[&X]"
ButtonStyle = 3
BevelWidth = 0
End
End
Begin VB.Label Label6
BackColor = &H80000007&
Caption = "Label6"
Height = 5190
Left = 180
TabIndex = 4
Top = 645
Width = 10455
End
End
Attribute VB_Name = "frm商品配送单"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
':::::::::::::::::::::代销付款管理模块::::::::::::::::::::::::
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Option Explicit
Private Const TableName As String = "商品配送单"
Private QueryFlag As Boolean '记录查询状态
Private TableState As String '当前状态
Private Temp As String
Private QueryRs As New ADODB.Recordset
Private Sub ShowPosition()
On Error Resume Next
sb1.Panels(1).Text = "共" & Trim(Str(QueryRs.RecordCount)) & "条,第:" & Trim(Str(QueryRs.AbsolutePosition)) & "条"
End Sub
'进入查询状态
Private Sub BeginQuery()
cmdNew.Enabled = False
cmdSave.Enabled = False
cmdVil.Enabled = False
cmdDelete.Enabled = False
QueryFlag = True
cmdQuery.Caption = "开始[&Q]"
End Sub
'恢复查询前的状态
Private Sub RestoreState()
Call RefreshTable(" ")
cmdNew.Enabled = True
cmdSave.Enabled = True
cmdVil.Enabled = True
cmdDelete.Enabled = True
cmdQuery.Caption = "查询[&Q]"
End Sub
'完成查询
Private Sub CommitQuery()
On Error GoTo MyErr
Dim strSQL As String
Dim strTemp As String
strSQL = "SELECT 表单号 FROM " & TableName & " WHERE "
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If (Trim(txtPurcode.Text) <> "") Then
strTemp = "表单号 LIKE '" & Trim(txtPurcode.Text) & "' AND "
strSQL = strSQL & strTemp
End If
'配送日期
If (Trim(txtPurdate.Text) <> "") Then
strTemp = " 配送日期 = '" & Trim(txtPurdate.Text) & "' AND "
strSQL = strSQL & strTemp
End If
If Trim(grdDET.Columns(1).Text) <> "" Then
strTemp = " 商品编码 like '" & Trim(grdDET.Columns(1).Text) & "' AND "
strSQL = strSQL & strTemp
End If
'录入员
If (Trim(txtIptno.Text) <> "") Then
strTemp = "录入员 LIKE '" & Trim(txtIptno.Text) & "' AND "
strSQL = strSQL & strTemp
End If
If (Trim(txtSuppno.Text) <> "") Then
strTemp = "分店编码 LIKE '" & Trim(txtSuppno.Text) & "' AND "
strSQL = strSQL & strTemp
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If (Right(Trim(strSQL), 5) = "WHERE") Then
strSQL = Left(Trim(strSQL), Len(Trim(strSQL)) - 5)
Else
strSQL = Left(Trim(strSQL), Len(Trim(strSQL)) - 3)
End If
strSQL = strSQL & " group by 表单号 order by 表单号 desc "
RestoreState
Set QueryRs = Nothing
QueryRs.CursorLocation = adUseClient
QueryRs.Open strSQL, Conn, adOpenDynamic, adLockReadOnly
If (Not QueryRs.EOF) Then
RefreshTable (QueryRs("表单号"))
cmdPrev.Enabled = True
cmdNext.Enabled = True
Else
Call RefreshTable("")
cmdPrev.Enabled = False
cmdNext.Enabled = False
End If
Exit Sub
MyErr:
MsgBox "查询条件或者数据库发生错误,请检查." & Chr(13) & "错误信息:" & Err.Description, vbCritical
End Sub
Private Function CommSaveTable() As Boolean
Dim sSQL As String
On Error GoTo CommSaveErr
sSQL = "DELETE FROM " & TableName & " WHERE 表单号='" & Trim(txtPurcode.Text) & "'"
Cmd.CommandText = sSQL
Cmd.Execute
If SaveTable() Then
CommSaveTable = True
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -