?? productivity.frm
字號:
VERSION 5.00
Begin VB.Form frmProductvity
BorderStyle = 1 'Fixed Single
Caption = "Productivity"
ClientHeight = 3630
ClientLeft = 45
ClientTop = 330
ClientWidth = 3690
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3630
ScaleWidth = 3690
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton cmdReport
Caption = "&Report"
Height = 375
Left = 720
TabIndex = 20
Top = 2520
Width = 735
End
Begin VB.CommandButton cmdExit
Caption = "E&xit"
Height = 375
Left = 2880
TabIndex = 19
Top = 3120
Width = 735
End
Begin VB.CommandButton cmdModify
Caption = "&Modify"
Height = 375
Left = 720
TabIndex = 18
Top = 3120
Width = 615
End
Begin VB.CommandButton cmdSave
Caption = "&Save"
Height = 375
Left = 1440
TabIndex = 17
Top = 3120
Width = 615
End
Begin VB.CommandButton cmdDelete
Caption = "&Delete"
Height = 375
Left = 2160
TabIndex = 16
Top = 3120
Width = 615
End
Begin VB.CommandButton cmdNew
Caption = "&New"
Height = 375
Left = 0
TabIndex = 15
Top = 3120
Width = 615
End
Begin VB.CommandButton cmdPrevious
Caption = "<"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2205
TabIndex = 14
Top = 2520
Width = 375
End
Begin VB.CommandButton cmdNext
Caption = ">"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2715
TabIndex = 13
Top = 2520
Width = 375
End
Begin VB.CommandButton cmdLast
Caption = ">|"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3240
TabIndex = 12
Top = 2520
Width = 375
End
Begin VB.CommandButton cmdFirst
Caption = "|<"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1680
TabIndex = 11
Top = 2520
Width = 375
End
Begin VB.TextBox txtNoOfPeople
Height = 285
Left = 1920
MaxLength = 7
TabIndex = 10
Top = 2040
Width = 735
End
Begin VB.TextBox txtAnnualTurnover
Height = 285
Left = 1920
MaxLength = 15
TabIndex = 9
Top = 1560
Width = 1695
End
Begin VB.ComboBox cboAreaOfFocus
Height = 315
ItemData = "Database.frx":0000
Left = 1440
List = "Database.frx":0002
TabIndex = 8
Top = 1080
Width = 2175
End
Begin VB.ComboBox cboOrgType
Height = 315
ItemData = "Database.frx":0004
Left = 1800
List = "Database.frx":0006
TabIndex = 7
Top = 600
Width = 1815
End
Begin VB.TextBox txtID
Height = 285
Left = 480
TabIndex = 6
Top = 600
Width = 615
End
Begin VB.Label lblAreaofFocus
Caption = "Area of Focus"
Height = 195
Left = 120
TabIndex = 5
Top = 1155
Width = 1065
End
Begin VB.Label lblAnnualTurnover
AutoSize = -1 'True
Caption = "Annual Turnover in $"
Height = 195
Left = 120
TabIndex = 4
Top = 1560
Width = 1485
End
Begin VB.Label lblNoofPeople
Caption = "No. of People"
Height = 195
Left = 120
TabIndex = 3
Top = 2040
Width = 1065
End
Begin VB.Label lblTypeofOrg
Caption = "Org. Type "
Height = 435
Left = 1200
TabIndex = 2
Top = 600
Width = 375
End
Begin VB.Label lblID
AutoSize = -1 'True
Caption = "ID"
Height = 195
Left = 120
TabIndex = 1
Top = 600
Width = 165
End
Begin VB.Label lblTitle
AutoSize = -1 'True
Caption = "Productivity Survey"
BeginProperty Font
Name = "Arial"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 480
TabIndex = 0
Top = 120
Width = 2745
End
End
Attribute VB_Name = "frmProductvity"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim CnProductivity As ADODB.Connection
Dim RSProductivity As ADODB.Recordset
Dim RSProductivityNew As ADODB.Recordset
Dim RSProductivityModify As ADODB.Recordset
Dim MyQuery As String
Dim MyQueryNew As String
Dim MyQueryModify As String
Dim MyButtonAction As String
Dim i As Integer
Dim OrganizationType As String
Dim AreaOfFocus As String
' This event is to validate for numeric values
Private Sub cboAreaOfFocus_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 8
Case Else
KeyAscii = 0
MsgBox "Selection only"
End Select
End Sub
' This event is to validate for numeric values
Private Sub cboOrgType_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 8
Case Else
KeyAscii = 0
MsgBox "Selection only"
End Select
End Sub
'This control event is to delete a record.
Private Sub cmdDelete_Click()
Dim MyVar
MyVar = MsgBox("Do You Want to Delete?", 65, "Productivity")
If MyVar = 1 Then
RSProductivity.Delete
If RSProductivity.RecordCount > 0 Then
RSProductivity.MoveNext
If RSProductivity.EOF Then
RSProductivity.MovePrevious
End If
EnableFields
ClearAllFields
Display
DisableFields
Else
MsgBox "No records"
ClearAllFields
End If
Else
MsgBox "NO Record Deleted"
End If
End Sub
'This control event is to cancel the operation or close the application.
Private Sub cmdExit_Click()
If cmdExit.Caption = "E&xit" Then
Unload Me
Else
EnablecmdButtons
cmdExit.Caption = "E&xit"
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -