?? f_bumenpeixunjihua.frm
字號:
Index = 23
Left = 3720
Locked = -1 'True
TabIndex = 22
Top = 480
Width = 1695
End
Begin VB.TextBox txtFields
Appearance = 0 'Flat
DataField = "總經理簽字"
Height = 285
Index = 25
Left = 6240
Locked = -1 'True
TabIndex = 23
Top = 480
Width = 1695
End
Begin MSComCtl2.DTPicker DTPickers
DataField = "部門申請人簽字時間"
Height = 300
Index = 5
Left = 8520
TabIndex = 28
Top = 840
Width = 1695
_ExtentX = 2990
_ExtentY = 529
_Version = 393216
CheckBox = -1 'True
Format = 26869761
CurrentDate = 36186
End
Begin VB.Label lblLabels
Caption = "經 理"
Height = 255
Index = 19
Left = 120
TabIndex = 87
Top = 480
Width = 975
End
Begin VB.Label lblLabels
Caption = "部門申請人"
Height = 255
Index = 10
Left = 8520
TabIndex = 82
Top = 240
Width = 1335
End
Begin VB.Label lblLabels
Caption = "人力資源部:"
Height = 255
Index = 21
Left = 1080
TabIndex = 54
Top = 240
Width = 975
End
Begin VB.Label lblLabels
Caption = "財務部"
Height = 255
Index = 23
Left = 3720
TabIndex = 53
Top = 240
Width = 1455
End
Begin VB.Label lblLabels
Caption = "總經理"
Height = 255
Index = 25
Left = 6240
TabIndex = 52
Top = 240
Width = 1335
End
Begin VB.Label lblLabels
Caption = "簽字時間"
Height = 255
Index = 24
Left = 120
TabIndex = 51
Top = 840
Width = 975
End
End
Begin VB.Frame Frame10
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1215
Left = 240
TabIndex = 40
Top = 6720
Width = 495
Begin VB.Label Label6
Caption = "呈核"
Height = 735
Left = 120
TabIndex = 41
Top = 360
Width = 255
End
End
Begin VB.Label lblLabels
Caption = "計劃編號"
Height = 255
Index = 26
Left = 720
TabIndex = 89
Top = 480
Width = 975
End
Begin VB.Label lblLabels
Caption = "時 間"
Height = 255
Index = 0
Left = 8400
TabIndex = 79
Top = 480
Width = 735
End
Begin VB.Label lblLabels
Caption = "部 門"
Height = 255
Index = 1
Left = 4800
TabIndex = 78
Top = 480
Width = 615
End
End
Begin VB.TextBox txtFields
DataField = "部門申請人簽字時間"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Index = 28
Left = 2040
TabIndex = 37
Top = 9020
Width = 3375
End
Begin VB.TextBox txtFields
DataField = "部門申請人簽字"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Index = 27
Left = 2040
TabIndex = 35
Top = 8700
Width = 3375
End
Begin MSDataGridLib.DataGrid grdDataGrid
Height = 1300
Left = 0
TabIndex = 38
Top = 9340
Width = 5765
_ExtentX = 10160
_ExtentY = 2275
_Version = 393216
AllowUpdate = 0 'False
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.Label lblLabels
Caption = "部門申請人簽字時間:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 28
Left = 120
TabIndex = 36
Top = 9020
Width = 1815
End
Begin VB.Label lblLabels
Caption = "部門申請人簽字:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 27
Left = 120
TabIndex = 34
Top = 8700
Width = 1815
End
End
Attribute VB_Name = "F_BuMenPeiXunJiHua"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim WithEvents adoPrimaryRS As Recordset
Attribute adoPrimaryRS.VB_VarHelpID = -1
Dim mvBookMark As Variant
Dim mbEditFlag As Boolean
Dim mbAddNewFlag As Boolean
Private Function UpdateData() As Boolean
Dim strTemp As String
Dim adochild As ADODB.Recordset
On Error GoTo UpdateErr
'更新父表
adoPrimaryRS.UpdateBatch adAffectCurrent
'檢查子表的有效性
Set adochild = New Recordset
Set adochild = adoPrimaryRS("ChildCMD").UnderlyingValue
If Not (adochild.BOF And adochild.EOF) Then
adochild.MoveFirst
End If
'While Not adochild.EOF
' If Trim(adochild.Fields("單價")) = "" Or IsNull(adochild.Fields("單價")) Or Not IsNumeric(adochild.Fields("單價")) Then
' MsgBox "請在單價中輸入數字!", vbExclamation + vbOKOnly, "警告"
' adochild.Close
' Set adochild = Nothing
'Exit Function
'End If
'If Trim(adochild.Fields("數量")) = "" Or IsNull(adochild.Fields("數量")) Or Not IsNumeric(adochild.Fields("單價")) Then
' MsgBox "請在數量中輸入數字!", vbExclamation + vbOKOnly, "警告"
' adochild.Close
' Set adochild = Nothing
'Exit Function
' End If
' adochild.MoveNext
' Wend
'更新子表
adochild.UpdateBatch adAffectAllChapters
adochild.Close
Set adochild = Nothing
' strTemp = txtFields(0).Text
' Set grdDataGrid.DataSource = Nothing
'adoPrimaryRS.Requery
'adoPrimaryRS.Find "目的港='" & strTemp & "'", 0, adSearchForward
'Set grdDataGrid.DataSource = adoPrimaryRS("ChildCMD").UnderlyingValue
UpdateData = True
If mbAddNewFlag Then
adoPrimaryRS.MoveLast 'move to the new record
End If
mbEditFlag = False
mbAddNewFlag = False
SetButtons True
Exit Function
UpdateErr:
UpdateData = False
End Function
Private Sub Combo1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then '
SendKeys "{TAB}"
End If
End Sub
Private Sub Combo2_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyAscii = vbKeyReturn Then '
SendKeys "{TAB}"
End If
End Sub
Private Sub DataGrid1_AfterColUpdate(ByVal ColIndex As Integer)
On Error Resume Next
If ColIndex = 1 Then
t = DataGrid1.Row
DataGrid1.Col = 1
DataGrid1.Row = t
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -