?? tjbmzgrs.frm
字號:
VERSION 5.00
Object = "{1FB3F7AD-7B17-4DC8-AC0E-35123A4CF9C5}#1.0#0"; "WinXPC Engine.ocx"
Begin VB.Form frm統(tǒng)計部門人數(shù)
BackColor = &H00E0E0E0&
BorderStyle = 1 'Fixed Single
Caption = "統(tǒng)計部門職工人數(shù)"
ClientHeight = 1995
ClientLeft = 45
ClientTop = 330
ClientWidth = 3750
ControlBox = 0 'False
FillColor = &H00008080&
ForeColor = &H00008080&
Icon = "tjbmzgrs.frx":0000
LinkTopic = "Form5"
MaxButton = 0 'False
MinButton = 0 'False
MouseIcon = "tjbmzgrs.frx":27A2
ScaleHeight = 1995
ScaleWidth = 3750
StartUpPosition = 2 '屏幕中心
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游標(biāo)
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 465
Left = 2160
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 1920
Visible = 0 'False
Width = 1140
End
Begin VB.CommandButton Command1
Caption = "統(tǒng)計(&Q)"
Height = 315
Left = 360
MouseIcon = "tjbmzgrs.frx":346C
TabIndex = 2
Top = 1560
Width = 975
End
Begin VB.CommandButton Command2
Caption = "退出(&X)"
Height = 315
Left = 2160
MouseIcon = "tjbmzgrs.frx":4136
TabIndex = 3
Top = 1560
Width = 975
End
Begin VB.Frame Frame1
BackColor = &H00E0E0E0&
Height = 1335
Left = 120
TabIndex = 4
Top = 120
Width = 3375
Begin VB.ComboBox Combo1
ForeColor = &H00400000&
Height = 300
ItemData = "tjbmzgrs.frx":4E00
Left = 1200
List = "tjbmzgrs.frx":4E13
MouseIcon = "tjbmzgrs.frx":4E47
TabIndex = 0
Top = 360
Width = 1935
End
Begin VB.TextBox Text3
Alignment = 2 'Center
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 270
Left = 1000
Locked = -1 'True
TabIndex = 1
Top = 855
Width = 2205
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "部門人數(shù):"
Height = 255
Left = 120
TabIndex = 6
Top = 885
Width = 975
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "請選擇部門:"
Height = 255
Left = 120
TabIndex = 5
Top = 405
Width = 1095
End
End
Begin WinXPC_Engine.WindowsXPC WindowsXPC1
Left = 1200
Top = 1680
_ExtentX = 6588
_ExtentY = 1085
ColorScheme = 2
End
End
Attribute VB_Name = "frm統(tǒng)計部門人數(shù)"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
Data1.DatabaseName = App.Path + "\DATA\職工工資管理.mdb"
Data1.RecordSource = "職工表"
WindowsXPC1.InitSubClassing
Text3 = ""
End Sub
Private Sub Command1_Click()
Dim Num As Integer, Result As Integer
Data1.Recordset.FindFirst "[部門] = " + "'" + Combo1.Text + "'"
If Data1.Recordset.NoMatch Then
Result = MsgBox("沒有該部門記錄,是否統(tǒng)計其他部門的記錄 ?", vbOKCancel + vbQuestion)
Text3 = ""
If Result = 1 Then
Combo1.Text = ""
Combo1.SetFocus
Exit Sub
Else
Unload Me
End If
End If
Do While Data1.Recordset.EOF = False
If Data1.Recordset.NoMatch Then
Data1.Recordset.MoveNext
Else
Num = Num + 1
End If
Data1.Recordset.FindNext "[部門] = " + "'" + Combo1.Text + "'"
Loop
Text3 = "職工人數(shù)為:" + Str(Num) + "人"
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
'rt.Close
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -