⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄

📁 VB开发的ERP系统
💻
字号:
VERSION 5.00
Begin VB.Form Book_Total_Search 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "资产统计报表查询条件"
   ClientHeight    =   1755
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   3810
   HelpContextID   =   505006
   Icon            =   "资产统计报表查询条件.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1755
   ScaleWidth      =   3810
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      ForeColor       =   &H00FF0000&
      Height          =   1305
      Left            =   60
      TabIndex        =   7
      Top             =   0
      Width           =   3690
      Begin VB.ComboBox Com_Year 
         Height          =   300
         Index           =   0
         Left            =   1005
         Style           =   2  'Dropdown List
         TabIndex        =   3
         Top             =   870
         Width           =   1095
      End
      Begin VB.ComboBox Com_Year 
         Height          =   300
         Index           =   1
         Left            =   2445
         Style           =   2  'Dropdown List
         TabIndex        =   4
         Top             =   870
         Width           =   1095
      End
      Begin VB.OptionButton CxOption 
         Caption         =   "按资产类别"
         Height          =   225
         Index           =   2
         Left            =   150
         TabIndex        =   2
         Top             =   585
         Width           =   2835
      End
      Begin VB.OptionButton CxOption 
         Caption         =   "按部门"
         Height          =   225
         Index           =   1
         Left            =   2430
         TabIndex        =   1
         Top             =   255
         Width           =   855
      End
      Begin VB.OptionButton CxOption 
         Caption         =   "按部门和资产类别"
         Height          =   255
         Index           =   0
         Left            =   150
         TabIndex        =   0
         Top             =   240
         Value           =   -1  'True
         Width           =   1785
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "会计期间:"
         Height          =   180
         Left            =   150
         TabIndex        =   9
         Top             =   930
         Width           =   810
      End
      Begin VB.Line Line1 
         X1              =   2190
         X2              =   2370
         Y1              =   1020
         Y2              =   1020
      End
   End
   Begin VB.CheckBox UnloadCheck 
      Caption         =   "卸载窗体"
      Height          =   615
      Left            =   6345
      TabIndex        =   8
      Top             =   1995
      Width           =   825
   End
   Begin VB.CommandButton QxCommand 
      Cancel          =   -1  'True
      Caption         =   "取消(&C)"
      Height          =   300
      Left            =   2630
      TabIndex        =   6
      Top             =   1395
      Width           =   1120
   End
   Begin VB.CommandButton QdCommand 
      Caption         =   "确定(&O)"
      Height          =   300
      Left            =   1430
      TabIndex        =   5
      Top             =   1395
      Width           =   1120
   End
End
Attribute VB_Name = "Book_Total_Search"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'**************************************************
'*    模 块 名 称 :固定资产统计查询条件
'*    功 能 描 述 :
'*    程序员姓名  : 徐衍民
'*    最后修改人  : 徐衍民
'*    最后修改时间:2000/12/18
'*    备        注:
'**************************************************

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 = New ADODB.Recordset
    rstemp.Open "Select distinct Year,Period from Gdzc_Total order by year,period", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
    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_Total.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 + -