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

📄 单位定义查找.frm

📁 财务信息管理系统,适合做毕业论文的人使用
💻 FRM
字号:
VERSION 5.00
Object = "{A0C292A3-118E-11D2-AFDF-000021730160}#1.0#0"; "UFEDIT.OCX"
Begin VB.Form frmEntDefSer 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "单位定义 - 查找"
   ClientHeight    =   2160
   ClientLeft      =   2550
   ClientTop       =   2865
   ClientWidth     =   6090
   Icon            =   "单位定义查找.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2160
   ScaleWidth      =   6090
   ShowInTaskbar   =   0   'False
   Begin VB.Frame Frame1 
      Height          =   2025
      Left            =   150
      TabIndex        =   6
      Top             =   15
      Width           =   4395
      Begin VB.ComboBox cobtype 
         BackColor       =   &H00FFFFFF&
         Height          =   300
         Left            =   705
         Style           =   2  'Dropdown List
         TabIndex        =   0
         Top             =   300
         Width           =   1815
      End
      Begin EDITLib.Edit txt 
         Height          =   270
         Index           =   0
         Left            =   705
         TabIndex        =   1
         Top             =   720
         Width           =   3390
         _Version        =   65536
         _ExtentX        =   5980
         _ExtentY        =   476
         _StockProps     =   253
         ForeColor       =   0
         BackColor       =   16777215
         Appearance      =   1
         Property        =   1
         MaxLength       =   20
         BadStr          =   "|"
      End
      Begin EDITLib.Edit txt 
         Height          =   270
         Index           =   1
         Left            =   705
         TabIndex        =   2
         Top             =   1125
         Width           =   3375
         _Version        =   65536
         _ExtentX        =   5953
         _ExtentY        =   476
         _StockProps     =   253
         ForeColor       =   0
         BackColor       =   16777215
         Appearance      =   1
         Property        =   1
         BadStr          =   "|"
      End
      Begin EDITLib.Edit txt 
         Height          =   270
         Index           =   2
         Left            =   705
         TabIndex        =   3
         Top             =   1500
         Width           =   3375
         _Version        =   65536
         _ExtentX        =   5953
         _ExtentY        =   476
         _StockProps     =   253
         ForeColor       =   0
         BackColor       =   16777215
         Appearance      =   1
         Property        =   1
         BadStr          =   "|"
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "类型"
         Height          =   180
         Left            =   240
         TabIndex        =   10
         Top             =   360
         Width           =   360
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "编码"
         Height          =   180
         Index           =   0
         Left            =   240
         TabIndex        =   9
         Top             =   765
         Width           =   360
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "名称"
         Height          =   180
         Left            =   240
         TabIndex        =   8
         Top             =   1170
         Width           =   360
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "备注"
         Height          =   180
         Index           =   1
         Left            =   240
         TabIndex        =   7
         Top             =   1545
         Width           =   360
      End
   End
   Begin VB.CommandButton cmdFind 
      Caption         =   "放弃"
      Height          =   345
      Index           =   1
      Left            =   4710
      TabIndex        =   5
      Top             =   720
      Width           =   1155
   End
   Begin VB.CommandButton cmdFind 
      Caption         =   "查找下一个"
      Default         =   -1  'True
      Height          =   345
      Index           =   0
      Left            =   4710
      TabIndex        =   4
      Top             =   270
      Width           =   1155
   End
End
Attribute VB_Name = "frmEntDefSer"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'软件著作权: 北京用友软件集团有限公司
'系统名称: 资金管理8.0
'功能说明: 开户单位查找
'作者: 魏小黎
Option Explicit

Dim binit As Boolean

Private Sub cmdCancek_Click(Index As Integer)
    Unload Me
End Sub

Private Sub cmdfind_Click(Index As Integer)
    On Error Resume Next
    If Index = 1 Then
        Unload Me
        Exit Sub
    End If
  
    If binit Then rsfind_init
    With clsUnit
        If .rsFind.RecordCount = 0 Then
            Beep
            MsgBox "未发现符合条件的单位!", vbInformation, zjGl_Name
            Exit Sub
        End If
    
        If Not binit Then .rsFind.MoveNext
    
        If .rsFind.EOF Then
            Beep
            MsgBox "已搜索完毕!", vbInformation, zjGl_Name
            set_init_true
            Exit Sub
        Else
            .GenFindNext
        End If
    End With
  
    set_init_false

End Sub

Private Sub set_init_false()
    binit = False
End Sub

Private Sub cobtype_Click()
    set_init_true
End Sub

Private Sub Form_Load()
    CenterForm Me
    Me.Icon = LoadResPicture(109, vbResIcon)
    load_data
    set_init_true
End Sub

Private Sub load_data()
    cobtype.AddItem ""
    cobtype.AddItem "0 - 个人"
    cobtype.AddItem "1 - 部门"
    cobtype.AddItem "2 - 银行"
    cobtype.AddItem "3 - 客户"
    cobtype.AddItem "4 - 供应商"
    cobtype.AddItem "5 - 项目"
    cobtype.ListIndex = 0
End Sub

Private Sub set_init_true()
    binit = True
End Sub

Private Sub rsfind_init()
    Dim sql As String
    sql = ""
    If txt(0) <> "" Then
        sql = sql & "(cUnitCode like '" & txt(0) & "%')"
    End If
  
    If txt(1) <> "" Then
        If sql <> "" Then sql = sql & " and "
        sql = sql & "(cUnitName like '" & txt(1) & "%')"
    End If
  
    If txt(2) <> "" Then
        If sql <> "" Then sql = sql & " and "
        sql = sql & "(cMark like '" & txt(2) & "%')"
    End If
  
    If cobtype.ListIndex <> 0 Then
        If sql <> "" Then sql = sql & " and "
        sql = sql & "itype=" & Left(cobtype, 1)
    End If
  
    If sql = "" Then
        sql = "itype>-1"
    End If
  
    sql = "select * from FD_AccUnit where " & sql & " order by cUnitCode"
    Set clsUnit.rsFind = dbsZJ.OpenRecordset(sql, dbOpenSnapshot)
    
End Sub

Private Sub txt_Click(Index As Integer)
    set_init_true
End Sub

'Private Sub txt_LostFocus(Index As Integer)
'    Dim bfind As Boolean
'    Dim UnitStr As String
'    If Index = 0 Then
'        UnitStr = EntCodeToName(txt(0), bfind)
'        If bfind Then
'            txt(1) = UnitStr
'        End If
'    ElseIf Index = 1 Then
'        UnitStr = EntNameToCode(txt(1), bfind)
'        If bfind Then
'            txt(0) = UnitStr
'        End If
'    End If
'End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -