?? 單位定義查找.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
'軟件著作權: 北京用友軟件集團有限公司
'系統(tǒng)名稱: 資金管理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 "未發(fā)現(xiàn)符合條件的單位!", 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 + -