📄 i
字号:
VERSION 5.00
Begin VB.Form Book_Depr_Search
BorderStyle = 3 'Fixed Dialog
Caption = "折旧计算报表查询条件"
ClientHeight = 1110
ClientLeft = 45
ClientTop = 330
ClientWidth = 3720
HelpContextID = 505007
Icon = "折旧计算报表查询条件.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1110
ScaleWidth = 3720
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
ForeColor = &H00FF0000&
Height = 645
Left = 60
TabIndex = 5
Top = 0
Width = 3585
Begin VB.ComboBox Com_Year
Height = 300
Index = 0
Left = 990
Style = 2 'Dropdown List
TabIndex = 0
Top = 210
Width = 1065
End
Begin VB.ComboBox Com_Year
Height = 300
Index = 1
Left = 2400
Style = 2 'Dropdown List
TabIndex = 1
Top = 210
Width = 1065
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "会计期间:"
Height = 180
Left = 120
TabIndex = 6
Top = 270
Width = 810
End
Begin VB.Line Line1
X1 = 2130
X2 = 2310
Y1 = 360
Y2 = 360
End
End
Begin VB.CheckBox UnloadCheck
Caption = "卸载窗体"
Height = 615
Left = 6735
TabIndex = 4
Top = 2025
Width = 825
End
Begin VB.CommandButton QxCommand
Cancel = -1 'True
Caption = "取消(&C)"
Height = 300
Left = 2525
TabIndex = 3
Top = 735
Width = 1120
End
Begin VB.CommandButton QdCommand
Caption = "确定(&O)"
Height = 300
Left = 1325
TabIndex = 2
Top = 735
Width = 1120
End
End
Attribute VB_Name = "Book_Depr_Search"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'**************************************************
'* 模 块 名 称 :资产折旧计算表查询条件
'* 功 能 描 述 :
'* 程序员姓名 : 徐衍民
'* 最后修改人 : 徐衍民
'* 最后修改时间:2000/12/19
'* 备 注:
'**************************************************
Dim Tsxx As String '系统信息提示
Dim rstemp As ADODB.Recordset '临时数据集
'以下为固定使用变量(文本框)
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) '控 制 焦 点 转 移
Dim jdzygs As Integer '控件焦点转移个数
jdzygs = 30
Select Case KeyAscii
Case vbKeyReturn
If Kjjdzy(jdzygs) Then
KeyAscii = 0
End If
Case 39 '屏蔽"'"
KeyAscii = 0
End Select
End Sub
Private Sub Form_Load()
'填充会计期间下拉列表
Set rstemp = Cw_DataEnvi.DataConnect.Execute("select distinct Year,Period from Gdzc_Total order by year,period")
While Not rstemp.EOF
Com_Year(0).AddItem rstemp!Year & "." & IIf(rstemp!Period < 10, "0" & rstemp!Period, rstemp!Period)
Com_Year(1).AddItem rstemp!Year & "." & IIf(rstemp!Period < 10, "0" & rstemp!Period, rstemp!Period)
rstemp.MoveNext
Wend
rstemp.Close
Set rstemp = Nothing
If Com_Year(0).ListCount > 0 Then Com_Year(0).Text = Com_Year(0).List(0)
If Com_Year(1).ListCount > 0 Then Com_Year(1).Text = Com_Year(1).List(Com_Year(1).ListCount - 1)
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadCheck.Value <> 1 Then
Cancel = 1
Me.Hide
End If
End Sub
Private Sub QdCommand_Click() '确 定
'录入条件有效性判断
If Not Lrtjyxxpd Then
Exit Sub
End If
Me.Hide
'激活查询过程
Book_Depr.Timer1.Enabled = True
End Sub
Private Sub QxCommand_Click() '取消
Me.Hide
End Sub
Private Function Lrtjyxxpd() As Boolean '用户录入条件有效性判断
'会计期间范围应由小到大
If Trim(Com_Year(0).Text) <> "" And Trim(Com_Year(1).Text) <> "" Then
If Val(LeftChar(Trim(Com_Year(1).Text)) + RightChar(Trim(Com_Year(1).Text))) < Val(LeftChar(Trim(Com_Year(0).Text)) + RightChar(Trim(Com_Year(0).Text))) Then
Tsxx = "查询会计期间应由小到大!"
Call Xtxxts(Tsxx, 0, 4)
Exit Function
End If
End If
Lrtjyxxpd = True
End Function
'*****************************************************
'[>>自定义函数
'取右字符串
Function RightChar(str As String) As String
If str = "" Then Exit Function
Dim i As Integer
i = InStrRev(str, ".")
RightChar = Mid(str, i + 1)
End Function
'取左字符串
Function LeftChar(str As String) As String
If str = "" Then Exit Function
Dim i As Integer
i = InStr(str, ".")
LeftChar = Mid(str, 1, i - 1)
End Function
'<<]
'*****************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -