📄 frmtotalitem.frm
字号:
VERSION 5.00
Begin VB.Form frmTotalItem
BorderStyle = 3 'Fixed Dialog
Caption = "选择合计项目"
ClientHeight = 1200
ClientLeft = 45
ClientTop = 330
ClientWidth = 3525
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1200
ScaleWidth = 3525
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton cmdOK
Height = 350
Index = 1
Left = 2190
Style = 1 'Graphical
TabIndex = 2
Tag = "1002"
Top = 570
UseMaskColor = -1 'True
Width = 1215
End
Begin VB.CommandButton cmdOK
Height = 350
Index = 0
Left = 2190
Style = 1 'Graphical
TabIndex = 1
Tag = "1001"
Top = 210
UseMaskColor = -1 'True
Width = 1215
End
Begin VB.ComboBox cboItem
Height = 300
Left = 180
Style = 2 'Dropdown List
TabIndex = 0
Top = 210
Width = 1815
End
End
Attribute VB_Name = "frmTotalItem"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private WithEvents mclsMainControl As MainControl
Attribute mclsMainControl.VB_VarHelpID = -1
Private mblnIsOK As Boolean
Private Sub cmdOk_Click(Index As Integer)
If Index = 0 Then
'确定
mblnIsOK = True
With frmGrantByBank
With .CurrLstBox
.Text = .Text & "(" & cboItem & ")"
End With
.CurrGrid.Text = .CurrLstBox.Text
End With
Else
'取消
mblnIsOK = True
frmGrantByBank.CurrLstBox.Text = ""
End If
Unload Me
End Sub
Private Sub Form_Load()
On Error GoTo HandleErr
MousePointer = vbHourglass
Set mclsMainControl = gclsSys.MainControls.Add(Me)
mblnIsOK = False
IniCboItem
MousePointer = vbDefault
Exit Sub
HandleErr:
Unload Me
End Sub
'初始化合计项目cbo
Private Sub IniCboItem()
Dim strSql As String
'Dim recTmp As Recordset
Dim recTmp As rdoResultset
Me.Left = (Screen.width - Me.width) / 2
Me.top = (Screen.Height - Me.Height) / 2
'strSql = "SELECT strViewFieldDesc as 项目 FROM " _
& "SalaryList,SalaryField,ViewField WHERE " _
& "SalaryList.lngSalaryListID=" & frmGrantByBank.SalaryListID _
& "AND SalaryList.lngSalaryListID=SalaryField.lngS" _
& "alaryListID AND SalaryField.lngViewFieldID=View" _
& "Field.lngViewFieldID AND ucase(ViewField.strFieldType)='DOUBLE'"
'Set recTmp = gclsBase.BaseDB.OpenRecordset(strSql, dbOpenSnapshot)
strSql = "SELECT strViewFieldDesc as 项目 FROM SalaryList,SalaryField,ViewField " _
& " WHERE SalaryList.lngSalaryListID=" & frmGrantByBank.SalaryListID _
& " AND SalaryList.lngSalaryListID=SalaryField.lngSalaryListID " _
& " AND SalaryField.lngViewFieldID=ViewField.lngViewFieldID " _
& " AND ViewField.lngviewID= 63 " _
& " AND UPPER(ViewField.strFieldType)='DOUBLE'"
Set recTmp = gclsBase.BaseDB.OpenResultset(strSql, rdOpenStatic)
With recTmp
Do Until .EOF
cboItem.AddItem recTmp!项目
.MoveNext
Loop
.Close
End With
Set recTmp = Nothing
If cboItem.ListCount >= 1 Then
cboItem.ListIndex = 0
End If
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If Not mblnIsOK Then
frmGrantByBank.CurrLstBox.Text = ""
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
gclsSys.MainControls.Remove Me
Set frmTotalItem = Nothing
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -