📄 frmproductionprogressitemdate1info.frm
字号:
VERSION 5.00
Object = "{4932CEF1-2CAA-11D2-A165-0060081C43D9}#2.0#0"; "Actbar2.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmProductionProgressItemDate1Info
Caption = "煮漂信息"
ClientHeight = 1935
ClientLeft = 60
ClientTop = 345
ClientWidth = 3630
LinkTopic = "Form1"
ScaleHeight = 1935
ScaleWidth = 3630
StartUpPosition = 3 'Windows Default
Begin ActiveBar2LibraryCtl.ActiveBar2 ActiveBar21
Height = 1935
Left = 0
TabIndex = 0
Top = 0
Width = 3630
_LayoutVersion = 1
_ExtentX = 6403
_ExtentY = 3413
_DataPath = ""
Bands = "frmProductionProgressItemDate1Info.frx":0000
Begin VB.Frame Frame1
Height = 1275
Left = 60
TabIndex = 1
Top = 540
Width = 3495
Begin VB.TextBox txtId
Height = 285
Left = 240
TabIndex = 6
Top = 1080
Visible = 0 'False
Width = 435
End
Begin VB.TextBox txtOrderNo
BackColor = &H8000000F&
Enabled = 0 'False
Height = 315
Left = 1320
MaxLength = 20
TabIndex = 3
Top = 240
Width = 1995
End
Begin MSComCtl2.DTPicker DTPprogress
Height = 315
Left = 1320
TabIndex = 2
Top = 780
Width = 1995
_ExtentX = 3519
_ExtentY = 556
_Version = 393216
Format = 208338945
CurrentDate = 39664
End
Begin VB.Label Label50
Caption = "加工單編號"
Height = 315
Left = 180
TabIndex = 5
Top = 300
Width = 975
End
Begin VB.Label Label1
Caption = "煮漂日期"
Height = 255
Left = 180
TabIndex = 4
Top = 780
Width = 855
End
End
End
End
Attribute VB_Name = "frmProductionProgressItemDate1Info"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public newItem As Boolean 'true表示增加
Private Sub ActiveBar21_ToolClick(ByVal Tool As ActiveBar2LibraryCtl.Tool)
Select Case Tool.Name
Case "cmdSave":
Save newItem
Case "cmdCancel":
Unload Me
End Select
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdOk_Click()
Save newItem
End Sub
Private Sub Form_Load()
Me.Move (Screen.Width - Me.Width) \ 2, (Screen.Height - Me.Height) \ 2
InitTitle
End Sub
Private Sub InitTitle()
Label1.Caption = "煮漂日期"
Label50.Caption = "加工單編號"
Me.Caption = "煮漂信息"
End Sub
Private Sub Save(Optional blModi As Boolean)
Dim strSql As String
Dim rs As ADODB.Recordset
On Error GoTo errHandle
Set rs = New ADODB.Recordset
With rs
.CursorLocation = adUseClient
.CursorType = adOpenDynamic
.LockType = adLockOptimistic
Set .ActiveConnection = Cn
End With
If blModi Then
strSql = "select * from tproductionProcess"
rs.Open strSql
If MsgBox("是否添加新的信息?", vbQuestion + vbYesNo, "询问") = vbNo Then
rs.Close
Set rs = Nothing
Exit Sub
End If
spModiProcess txtOrderNo, DTPprogress.Value, 1
rs.AddNew '新建
rs.Fields!ItemDate1 = DTPprogress.Value
rs.Fields!OrderNo = txtOrderNo
rs.Update
MsgBox "新建成功!", vbInformation, "恭喜'"
Else
strSql = "select * from tproductionProcess where id=" & txtId
rs.Open strSql
If MsgBox("是否修改记录?", vbYesNo + vbQuestion, "修改") = vbNo Then
rs.Close
Set rs = Nothing
Exit Sub
End If
spModiProcess txtOrderNo, DTPprogress.Value, 1
rs.Fields!ItemDate1 = DTPprogress.Value
rs.Update
MsgBox "修改成功!", vbInformation, "恭喜"
End If
rs.Close
Set rs = Nothing
frmProductionProgressItemDate1.FillMshf1 txtOrderNo
frmProductionProgress.FillMshf1 ("select * from tBusinessOrderSub a ,(select distinct orderno,delivery from tBusinessOrder) b where a.orderno=b.orderno order by a.orderno")
Unload Me
Exit Sub
errHandle:
Set rs = Nothing
objDatabase.DatabaseError
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -