来自「VB开发的ERP系统」· 代码 · 共 580 行 · 第 1/2 页
TXT
580 行
VERSION 5.00
Begin VB.Form AutoTran_AssMy
BackColor = &H00C0C0C0&
Caption = "辅助项目"
ClientHeight = 2445
ClientLeft = 60
ClientTop = 345
ClientWidth = 4140
Icon = "自动转帐凭证_自定义转帐辅助项目.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form3"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2445
ScaleWidth = 4140
StartUpPosition = 1 '所有者中心
Begin VB.TextBox LrText
Height = 300
Index = 1
Left = 795
TabIndex = 12
Text = "1"
Top = 510
Width = 2910
End
Begin VB.TextBox LrText
Height = 300
Index = 0
Left = 795
TabIndex = 11
Text = "0"
Top = 150
Width = 2910
End
Begin VB.TextBox LrText
Height = 300
Index = 2
Left = 795
TabIndex = 10
Text = "2"
Top = 870
Width = 2910
End
Begin VB.TextBox LrText
Height = 300
Index = 3
Left = 795
TabIndex = 9
Text = "3"
Top = 1230
Width = 2910
End
Begin VB.TextBox LrText
Height = 300
Index = 4
Left = 795
TabIndex = 8
Text = "4"
Top = 1590
Width = 2910
End
Begin VB.CommandButton Ydcommand1
Height = 300
Index = 0
Left = 3705
Picture = "自动转帐凭证_自定义转帐辅助项目.frx":1042
Style = 1 'Graphical
TabIndex = 7
Top = 180
Visible = 0 'False
Width = 300
End
Begin VB.CommandButton Ydcommand1
Height = 300
Index = 1
Left = 3705
Picture = "自动转帐凭证_自定义转帐辅助项目.frx":13CC
Style = 1 'Graphical
TabIndex = 6
Top = 540
Visible = 0 'False
Width = 300
End
Begin VB.CommandButton Ydcommand1
Height = 300
Index = 2
Left = 3705
Picture = "自动转帐凭证_自定义转帐辅助项目.frx":1756
Style = 1 'Graphical
TabIndex = 5
Top = 870
Visible = 0 'False
Width = 300
End
Begin VB.CommandButton Ydcommand1
Height = 300
Index = 3
Left = 3705
Picture = "自动转帐凭证_自定义转帐辅助项目.frx":1AE0
Style = 1 'Graphical
TabIndex = 4
Top = 1230
Visible = 0 'False
Width = 300
End
Begin VB.CommandButton Ydcommand1
Height = 300
Index = 4
Left = 3705
Picture = "自动转帐凭证_自定义转帐辅助项目.frx":1E6A
Style = 1 'Graphical
TabIndex = 3
Top = 1590
Visible = 0 'False
Width = 300
End
Begin VB.CommandButton BcCommand
Caption = "确定(&O)"
Height = 300
Left = 2070
TabIndex = 1
Top = 2070
Width = 915
End
Begin VB.CommandButton QxCommand
Cancel = -1 'True
Caption = "取消(&C)"
Height = 300
Left = 3090
TabIndex = 0
Top = 2070
Width = 915
End
Begin VB.Label Lab_ItemClass
BackStyle = 0 'Transparent
Caption = "Label1"
Height = 225
Left = 225
TabIndex = 18
Top = 1950
Visible = 0 'False
Width = 1215
End
Begin VB.Label TsLabel
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "部门:"
Height = 180
Index = 1
Left = 105
TabIndex = 17
Top = 570
Width = 450
End
Begin VB.Label TsLabel
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "个人:"
Height = 180
Index = 0
Left = 105
TabIndex = 16
Top = 210
Width = 450
End
Begin VB.Label TsLabel
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "项目:"
Height = 180
Index = 2
Left = 105
TabIndex = 15
Top = 900
Width = 450
End
Begin VB.Label TsLabel
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "客户:"
Height = 180
Index = 3
Left = 105
TabIndex = 14
Top = 1290
Width = 450
End
Begin VB.Label TsLabel
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "供应商:"
Height = 180
Index = 4
Left = 105
TabIndex = 13
Top = 1680
Width = 630
End
Begin VB.Label lab_GridRow
Height = 405
Left = 7545
TabIndex = 2
Top = 810
Width = 765
End
End
Attribute VB_Name = "AutoTran_AssMy"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'************************************************************************************
'* 模 块 名 称 :辅助核算项目录入
'* 功 能 描 述 :能够根据科目辅助核算项,自动出现辅助核算项目,并自动调整
'* 录入项目位置及窗体大小
'* 程序员姓名 : 姜冬梅
'* 最后修改人 : 姜冬梅
'* 最后修改时间:2001/04/29
'* 备 注:
'*
'* 1.对于网格列存储内容
'* 0-行有效标识 1-结算方式编码 2-结算方式名称 3-票号 4-发生日期 5-数量 6-单价
'* 7-计量单位 8-外币编码 9-外币名称 10-汇率 11-部门编码 12-部门名称 13-单位编码
'* 14-单位名称 15-职员编码 16-职员名称 17-项目大类编码 18-项目大类名称
'* 19-项目编码 20-项目名称 21-项目数量 22-项目计量单位
'************************************************************************************
Dim RecTemp As New ADODB.Recordset '临时使用动态集
Dim jdzygs As Integer '控件焦点转移个数
Dim Tsxx As String '系统提示信息
Dim Bln_FirstTab As Boolean '是否首次产生Tab键(主要用来判断Tab键是否由填置凭证窗体引起)
'以下为固定使用变量(文本框)
Dim Textvar() As Variant '存储变体型文本框信息
Dim Textboolean() As Boolean '存储布尔型文本框信息
Dim Textint() As Integer '存储整型文本框信息
Dim Textstr() As String '存储字符型文本框信息
Dim Max_Text_Index As Integer '最大录入文本框索引值
Dim TextGroupCode As String '文本框录入分组编码
Dim TextValiLock As Boolean '文本框失去焦点是否进行有效性控制判断
Dim TextValiJudgeLock() As Boolean '文本框录入有效性判断控制锁
Dim CurTextIndex As Integer '当前文本框索引值
Dim TextChangeLock As Boolean '文本框内容变换控制锁
Dim Bln_Cancel As Boolean '取消按钮信息传递
Private Sub Form_KeyPress(KeyAscii As Integer) '控 制 焦 点 转 移
jdzygs = 20
Select Case KeyAscii
Case vbKeyReturn
If Kjjdzy(jdzygs) Then
KeyAscii = 0
End If
Case 39 '屏蔽"'"
KeyAscii = 0
End Select
End Sub
'[ZJZ Begin 改进由填制凭证窗体引发的焦点转移 2001-06-16
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Bln_FirstTab Then
For Jsqte = 0 To Max_Text_Index
If LrText(Jsqte).Visible And LrText(Jsqte).Enabled Then
LrText(Jsqte).SetFocus
Exit For
End If
Next Jsqte
End If
Bln_FirstTab = False
End Sub
'[ZJZ End
Private Sub Form_Load()
'以下为文本框处理程序
TextGroupCode = "Cwzz_AutoAss"
Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr()) '读入文本框录入信息
Call Wbkcsh
Bln_FirstTab = True
End Sub
Private Function Bclrsj() As Boolean '判断录入数据有效性,并保存数据
Dim Jsqte As Integer
Dim Int_GridRow As Integer '数据回写网格行
For Jsqte = 0 To Max_Text_Index
If Textint(Jsqte, 8) = 1 And LrText(Jsqte).Visible Then '字段不能为空
If Len(Trim(LrText(Jsqte).Text)) = 0 Then
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?