📄 account.bas
字号:
SetToolBarButton 10, "冲销", "冲销凭证(Alt+B)", 29, True, tblReceipt
SetToolBarButton 11, "|", "", 0, True, tblReceipt
SetToolBarButton 12, "业务", "业务资料(Alt+G)", 45, True, tblReceipt
SetToolBarButton 13, "核销", "往来核销(Alt+K)", 42, True, tblReceipt
SetToolBarButton 14, "现金", "现金流量(Alt+M)", 43, True, tblReceipt
SetToolBarButton 15, "|", "", 0, True, tblReceipt
SetToolBarButton 16, "打印", "打印凭证(Alt+P)", 8, True, tblReceipt
SetToolBarButton 17, "列表", "凭证列表", 28, True, tblReceipt
SetToolBarButton 18, "设置", "工具栏格式设置", 40, True, tblReceipt
Else
SetToolBarButton 2, "下张", "查看下一张凭证(Ctrl+PageDown)", 0, True, tblReceipt
SetToolBarButton 3, "上张", "查看上一张凭证(Ctrl+PageUp)", 0, True, tblReceipt
SetToolBarButton 4, "确定", "保存当前凭证并退出(Ctrl+Enter)", 0, True, tblReceipt
SetToolBarButton 5, "取消", "不保存当前凭证并退出(Esc)", 0, True, tblReceipt
SetToolBarButton 6, "|", "", 0, True, tblReceipt
SetToolBarButton 7, "错误", "错误信息(Alt+O)", 0, True, tblReceipt
SetToolBarButton 8, "复核", "凭证复核(Alt+C)", 0, True, tblReceipt
SetToolBarButton 9, "记帐", "凭证记帐(Alt+J)", 0, True, tblReceipt
SetToolBarButton 10, "冲销", "冲销凭证(Alt+B)", 0, True, tblReceipt
SetToolBarButton 11, "|", "", 0, True, tblReceipt
SetToolBarButton 12, "业务", "业务资料(Alt+G)", 0, True, tblReceipt
SetToolBarButton 13, "核销", "往来核销(Alt+K)", 0, True, tblReceipt
SetToolBarButton 14, "现金", "现金流量(Alt+M)", 0, True, tblReceipt
SetToolBarButton 15, "|", "", 0, True, tblReceipt
SetToolBarButton 16, "打印", "打印凭证(Alt+P)", 0, True, tblReceipt
SetToolBarButton 17, "列表", "凭证列表", 0, True, tblReceipt
SetToolBarButton 18, "设置", "工具栏格式设置", 0, True, tblReceipt
End If
Case 8, 18 '商品调拨,商品期初
If ButtonMenuIndex = 1 Then
SetToolBarButton 7, "", "打印单据(Alt+P)", 8, True, tblReceipt
SetToolBarButton 8, "", "单据列表", 28, True, tblReceipt
SetToolBarButton 9, "", "工具栏格式设置", 40, True, tblReceipt
ElseIf ButtonMenuIndex = 2 Then
SetToolBarButton 7, "打印", "打印单据(Alt+P)", 8, True, tblReceipt
SetToolBarButton 8, "列表", "单据列表", 28, True, tblReceipt
SetToolBarButton 9, "设置", "工具栏格式设置", 40, True, tblReceipt
Else
SetToolBarButton 7, "打印", "打印单据(Alt+P)", 0, True, tblReceipt
SetToolBarButton 8, "列表", "单据列表", 0, True, tblReceipt
SetToolBarButton 9, "设置", "工具栏格式设置", 0, True, tblReceipt
End If
For i = 10 To .Buttons.Count
.Buttons(i).Visible = False
Next i
Case 10 '撤卸组装
If ButtonMenuIndex = 1 Then
SetToolBarButton 7, "", "关联凭证(Alt+G)", 48, True, tblReceipt
SetToolBarButton 8, "", "打印单据(Alt+P)", 8, True, tblReceipt
SetToolBarButton 9, "", "单据列表", 28, True, tblReceipt
SetToolBarButton 10, "", "工具栏格式设置", 40, True, tblReceipt
ElseIf ButtonMenuIndex = 2 Then
SetToolBarButton 7, "凭证", "关联凭证(Alt+G)", 48, True, tblReceipt
SetToolBarButton 8, "打印", "打印单据(Alt+P)", 8, True, tblReceipt
SetToolBarButton 9, "列表", "单据列表", 28, True, tblReceipt
SetToolBarButton 10, "设置", "工具栏格式设置", 40, True, tblReceipt
Else
SetToolBarButton 7, "凭证", "关联凭证(Alt+G)", 0, True, tblReceipt
SetToolBarButton 8, "打印", "打印单据(Alt+P)", 0, True, tblReceipt
SetToolBarButton 9, "列表", "单据列表", 0, True, tblReceipt
SetToolBarButton 10, "设置", "工具栏格式设置", 0, True, tblReceipt
End If
For i = 10 To .Buttons.Count
.Buttons(i).Visible = False
Next i
Case 21 '通用转帐
If ButtonMenuIndex = 1 Then
SetToolBarButton 7, "", "预览凭证(Alt+V)", 48, True, tblReceipt
SetToolBarButton 8, "", "单据列表", 28, True, tblReceipt
SetToolBarButton 9, "", "工具栏格式设置", 40, True, tblReceipt
For i = 10 To .Buttons.Count
.Buttons(i).Visible = False
Next i
ElseIf ButtonMenuIndex = 2 Then
SetToolBarButton 7, "预览凭证", "预览凭证(Alt+V)", 48, True, tblReceipt
SetToolBarButton 8, "列表", "单据列表", 28, True, tblReceipt
SetToolBarButton 9, "设置", "工具栏格式设置", 40, True, tblReceipt
For i = 10 To .Buttons.Count
.Buttons(i).Visible = False
Next i
Else
SetToolBarButton 7, "预览凭证", "预览凭证(Alt+V)", 0, True, tblReceipt
SetToolBarButton 8, "列表", "单据列表", 0, True, tblReceipt
SetToolBarButton 9, "设置", "工具栏格式设置", 0, True, tblReceipt
For i = 10 To .Buttons.Count
.Buttons(i).Visible = False
Next i
End If
Case 100, 101 '采购付款,销售收款单
If ButtonMenuIndex = 1 Then
SetToolBarButton 7, "", "单据冲销(Alt+G)", 29, True, tblReceipt
If ReceiptTypeID = 101 Then
SetToolBarButton 8, "", "应收筛选(Alt+I)", 47, True, tblReceipt
Else
SetToolBarButton 8, "", "应付筛选(Alt+I)", 46, True, tblReceipt
End If
SetToolBarButton 9, "", "关联凭证(Alt+Z)", 35, True, tblReceipt
SetToolBarButton 10, "|", "", 0, True, tblReceipt
SetToolBarButton 11, "", "记事薄", 27, True, tblReceipt
SetToolBarButton 12, "", "打印单据(Alt+P)", 8, True, tblReceipt
SetToolBarButton 13, "", "单据列表", 28, True, tblReceipt
SetToolBarButton 14, "", "工具栏格式设置", 40, True, tblReceipt
ElseIf ButtonMenuIndex = 2 Then
SetToolBarButton 7, "冲销", "单据冲销(Alt+G)", 29, True, tblReceipt
If ReceiptTypeID = 101 Then
SetToolBarButton 8, "筛选", "应收筛选(Alt+I)", 47, True, tblReceipt
Else
SetToolBarButton 8, "筛选", "应付筛选(Alt+I)", 46, True, tblReceipt
End If
SetToolBarButton 9, "凭证", "关联凭证(Alt+Z)", 35, True, tblReceipt
SetToolBarButton 10, "|", "", 0, True, tblReceipt
SetToolBarButton 11, "记事", "记事薄", 27, True, tblReceipt
SetToolBarButton 12, "打印", "打印单据(Alt+P)", 8, True, tblReceipt
SetToolBarButton 13, "列表", "单据列表", 28, True, tblReceipt
SetToolBarButton 14, "设置", "工具栏格式设置", 40, True, tblReceipt
Else
SetToolBarButton 7, "冲销", "单据冲销(Alt+G)", 0, True, tblReceipt
If ReceiptTypeID = 101 Then
SetToolBarButton 8, "筛选", "应收筛选(Alt+I)", 0, True, tblReceipt
Else
SetToolBarButton 8, "筛选", "应付筛选(Alt+I)", 0, True, tblReceipt
End If
SetToolBarButton 9, "凭证", "关联凭证(Alt+Z)", 0, True, tblReceipt
SetToolBarButton 10, "|", "", 0, True, tblReceipt
SetToolBarButton 11, "记事", "记事薄", 0, True, tblReceipt
SetToolBarButton 12, "打印", "打印单据(Alt+P)", 0, True, tblReceipt
SetToolBarButton 13, "列表", "单据列表", 0, True, tblReceipt
SetToolBarButton 14, "设置", "工具栏格式设置", 0, True, tblReceipt
End If
' For i = 17 To .Buttons.Count
' .Buttons(i).Visible = False
' Next i
Case Else
End Select
.Refresh
End With
End Sub
Public Function ToolBarIndex(ByVal cmdIndex As Long, ByVal strFormName As String) As Long
On Error Resume Next
strFormName = UCase(strFormName)
Select Case strFormName
Case "FRMVOUCHER"
If cmdIndex = 0 Then
ToolBarIndex = 2 '下一
ElseIf cmdIndex = 1 Then: ToolBarIndex = 3 '上一
ElseIf cmdIndex = 4 Then: ToolBarIndex = 4 '确定
ElseIf cmdIndex = 5 Then: ToolBarIndex = 5 '放弃
ElseIf cmdIndex = 6 Then: ToolBarIndex = 7 '错误
ElseIf cmdIndex = 7 Then: ToolBarIndex = 8 '复核
ElseIf cmdIndex = 8 Then: ToolBarIndex = 9 '记帐
ElseIf cmdIndex = 9 Then: ToolBarIndex = 10 '冲销
ElseIf cmdIndex = 10 Then: ToolBarIndex = 12 '资料
ElseIf cmdIndex = 11 Then: ToolBarIndex = 13 '核销
ElseIf cmdIndex = 12 Then: ToolBarIndex = 14 '现金
ElseIf cmdIndex = 13 Then: ToolBarIndex = 16 '打印
Else: ToolBarIndex = 0
End If
Case "FRMINVOICE", "FRMPAYABLE"
If cmdIndex = 0 Then
ToolBarIndex = 2 '下一
ElseIf cmdIndex = 1 Then: ToolBarIndex = 3 '上一
ElseIf cmdIndex = 4 Then: ToolBarIndex = 4 '确定
ElseIf cmdIndex = 5 Then: ToolBarIndex = 5 '放弃
ElseIf cmdIndex = 6 Then: ToolBarIndex = 7 '冲销
ElseIf cmdIndex = 7 Then: ToolBarIndex = 8 '收款
ElseIf cmdIndex = 8 Then: ToolBarIndex = 9 '核销
ElseIf cmdIndex = 9 Then: ToolBarIndex = 10 '凭证
ElseIf cmdIndex = 10 Then: ToolBarIndex = 12 '记事
ElseIf cmdIndex = 11 Then: ToolBarIndex = 13 '打印
Else: ToolBarIndex = 0
End If
Case "FRMPAYMENT", "FRMRECEIVE"
If cmdIndex = 0 Then
ToolBarIndex = 2 '下一
ElseIf cmdIndex = 1 Then: ToolBarIndex = 3 '上一
ElseIf cmdIndex = 4 Then: ToolBarIndex = 4 '确定
ElseIf cmdIndex = 5 Then: ToolBarIndex = 5 '放弃
ElseIf cmdIndex = 6 Then: ToolBarIndex = 7 '冲销
ElseIf cmdIndex = 7 Then: ToolBarIndex = 9 '核销
ElseIf cmdIndex = 8 Then: ToolBarIndex = 10 '凭证
ElseIf cmdIndex = 9 Then: ToolBarIndex = 12 '记事
ElseIf cmdIndex = 10 Then: ToolBarIndex = 13 '打印
Else: ToolBarIndex = 0
End If
Case "FRMR_P"
If cmdIndex = 0 Then
ToolBarIndex = 2 '下一
ElseIf cmdIndex = 1 Then: ToolBarIndex = 3 '上一
ElseIf cmdIndex = 2 Then: ToolBarIndex = 4 '确定
ElseIf cmdIndex = 3 Then: ToolBarIndex = 5 '放弃
ElseIf cmdIndex = 4 Then: ToolBarIndex = 7 '冲销
ElseIf cmdIndex = 5 Then: ToolBarIndex = 8 '筛选
ElseIf cmdIndex = 6 Then: ToolBarIndex = 9 '凭证
ElseIf cmdIndex = 7 Then: ToolBarIndex = 11 '记事
ElseIf cmdIndex = 8 Then: ToolBarIndex = 12 '打印
Else: ToolBarIndex = 0
End If
Case Else
End Select
End Function
Public Function cmdIndex(ByVal ToolBarIndex As Long, ByVal strFormName As String) As Long
On Error Resume Next
strFormName = UCase(strFormName)
Select Case strFormName
Case "FRMVOUCHER"
If ToolBarIndex = 2 Then
cmdIndex = 0 '下一
ElseIf ToolBarIndex = 3 Then: cmdIndex = 1 '上一
ElseIf ToolBarIndex = 4 Then: cmdIndex = 4 '确定
ElseIf ToolBarIndex = 5 Then: cmdIndex = 5 '放弃
ElseIf ToolBarIndex = 7 Then: cmdIndex = 6 '错误
ElseIf ToolBarIndex = 8 Then: cmdIndex = 7 '复核
ElseIf ToolBarIndex = 9 Then: cmdIndex = 8 '记帐
ElseIf ToolBarIndex = 10 Then: cmdIndex = 9 '冲销
ElseIf ToolBarIndex = 12 Then: cmdIndex = 10 '资料
ElseIf ToolBarIndex = 13 Then: cmdIndex = 11 '核销
ElseIf ToolBarIndex = 14 Then: cmdIndex = 12 '现金
ElseIf ToolBarIndex = 16 Then: cmdIndex = 13 '打印
Else: ToolBarIndex = 0
End If
Case "FRMINVOICE", "FRMPAYABLE"
If ToolBarIndex = 2 Then
cmdIndex = 0 '下一
ElseIf ToolBarIndex = 3 Then: cmdIndex = 1 '上一
ElseIf ToolBarIndex = 4 Then: cmdIndex = 4 '确定
ElseIf ToolBarIndex = 5 Then: cmdIndex = 5 '放弃
ElseIf ToolBarIndex = 7 Then: cmdIndex = 6 '冲销
ElseIf ToolBarIndex = 8 Then: cmdIndex = 7 '收付款
ElseIf ToolBarIndex = 9 Then: cmdIndex = 8 '核销
ElseIf ToolBarIndex = 10 Then: cmdIndex = 9 '凭证
ElseIf ToolBarIndex = 12 Then: cmdIndex = 10 '记事
ElseIf ToolBarIndex = 13 Then: cmdIndex = 11 '打印
Else: ToolBarIndex = 0
End If
Case "FRMPAYMENT", "FRMRECEIVE"
If ToolBarIndex = 2 Then
cmdIndex = 0 '下一
ElseIf ToolBarIndex = 3 Then: cmdIndex = 1 '上一
ElseIf ToolBarIndex = 4 Then: cmdIndex = 4 '确定
ElseIf ToolBarIndex = 5 Then: cmdIndex = 5 '放弃
ElseIf ToolBarIndex = 7 Then: cmdIndex = 6 '冲销
ElseIf ToolBarIndex = 9 Then: cmdIndex = 7 '核销
ElseIf ToolBarIndex = 10 Then: cmdIndex = 8 '凭证
ElseIf ToolBarIndex = 12 Then: cmdIndex = 9 '记事
ElseIf ToolBarIndex = 13 Then: cmdIndex = 10 '打印
Else: ToolBarIndex = 0
End If
Case "FRMR_P"
If ToolBarIndex = 2 Then
cmdIndex = 0 '下一
ElseIf ToolBarIndex = 3 Then: cmdIndex = 1 '上一
ElseIf ToolBarIndex = 4 Then: cmdIndex = 2 '确定
ElseIf ToolBarIndex = 5 Then: cmdIndex = 3 '放弃
ElseIf ToolBarIndex = 7 Then: cmdIndex = 4 '冲销
ElseIf ToolBarIndex = 8 Then: cmdIndex = 5 '筛选
ElseIf ToolBarIndex = 9 Then: cmdIndex = 6 '凭证
ElseIf ToolBarIndex = 11 Then: cmdIndex = 7 '记事
ElseIf ToolBarIndex = 12 Then: cmdIndex = 8 '打印
Else: cmdIndex = 0
End If
Case Else
End Select
End Function
Public Function ShowMessage(frmName As Form, ByVal lpText As String, ByVal wType As Long, Optional ByVal lpCaption As String = "") As Long
If Trim(lpText) = "" Then Exit Function
If frmName.Visible Then
If lpCaption = "" Then
lpCaption = frmName.Caption
End If
ShowMessage = MessageBox(frmName.hwnd, lpText, lpCaption, wType)
Else
lpText = FilterString(lpText, "!")
lpText = FilterString(lpText, ".")
lpText = FilterString(lpText, "。")
AddStrError lpText & "."
End If
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -