?? frmzc1.frm
字號:
VERSION 5.00
Begin VB.Form frmZC1
BorderStyle = 3 'Fixed Dialog
Caption = "轉(zhuǎn)倉單信息"
ClientHeight = 6732
ClientLeft = 48
ClientTop = 336
ClientWidth = 6132
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6732
ScaleWidth = 6132
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.TextBox txtItem
Height = 276
Index = 16
Left = 840
MaxLength = 200
MultiLine = -1 'True
TabIndex = 36
Top = 6720
Visible = 0 'False
Width = 492
End
Begin VB.TextBox txtItem
Height = 276
Index = 15
Left = 240
MaxLength = 200
MultiLine = -1 'True
TabIndex = 35
Top = 6720
Visible = 0 'False
Width = 492
End
Begin VB.TextBox txtItem
Height = 276
Index = 14
Left = 4320
MaxLength = 200
MultiLine = -1 'True
TabIndex = 34
Top = 6720
Visible = 0 'False
Width = 492
End
Begin VB.TextBox txtItem
Height = 276
Index = 13
Left = 4920
MaxLength = 200
MultiLine = -1 'True
TabIndex = 33
Top = 6720
Visible = 0 'False
Width = 492
End
Begin VB.TextBox txtItem
Height = 276
Index = 12
Left = 4920
MaxLength = 200
MultiLine = -1 'True
TabIndex = 32
Top = 6360
Visible = 0 'False
Width = 492
End
Begin VB.TextBox txtItem
Height = 276
Index = 11
Left = 4320
MaxLength = 200
MultiLine = -1 'True
TabIndex = 31
Top = 6360
Visible = 0 'False
Width = 492
End
Begin VB.TextBox txtItem
Height = 276
Index = 10
Left = 840
MaxLength = 200
MultiLine = -1 'True
TabIndex = 30
Top = 6360
Visible = 0 'False
Width = 492
End
Begin VB.TextBox txtItem
Height = 276
Index = 9
Left = 240
MaxLength = 200
MultiLine = -1 'True
TabIndex = 29
Top = 6360
Visible = 0 'False
Width = 492
End
Begin VB.Frame Frame1
Caption = "其它信息:"
Height = 1692
Index = 3
Left = 120
TabIndex = 22
Top = 4200
Width = 5895
Begin VB.TextBox txtItem
Height = 1320
Index = 8
Left = 240
MaxLength = 200
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 24
Top = 240
Width = 5175
End
End
Begin VB.Frame Frame1
Caption = "商品信息:"
Height = 1335
Index = 2
Left = 120
TabIndex = 18
Top = 2760
Width = 5895
Begin VB.TextBox txtItem
Height = 270
Index = 5
Left = 1320
MaxLength = 20
TabIndex = 37
Top = 600
Width = 1455
End
Begin VB.TextBox txtItem
Enabled = 0 'False
Height = 276
Index = 7
Left = 1320
MaxLength = 200
MultiLine = -1 'True
TabIndex = 8
Top = 960
Width = 1455
End
Begin VB.TextBox txtItem
Height = 270
Index = 6
Left = 4080
MaxLength = 20
TabIndex = 7
Top = 600
Width = 1455
End
Begin VB.TextBox txtItem
Enabled = 0 'False
Height = 270
Index = 4
Left = 1320
MaxLength = 20
TabIndex = 6
Top = 240
Width = 1455
End
Begin VB.ComboBox Combo1
Height = 315
Index = 3
Left = 4080
Style = 2 'Dropdown List
TabIndex = 5
Top = 240
Width = 1572
End
Begin VB.Label Label2
Caption = "期 號:"
Height = 255
Index = 11
Left = 240
TabIndex = 38
Top = 600
Width = 1095
End
Begin VB.Label Label2
Caption = "訂貨金額:"
Height = 255
Index = 6
Left = 240
TabIndex = 23
Top = 960
Width = 1095
End
Begin VB.Label Label2
Caption = "轉(zhuǎn)倉數(shù)量:"
Height = 255
Index = 2
Left = 2880
TabIndex = 21
Top = 600
Width = 1095
End
Begin VB.Label Label2
Caption = "商品代碼:"
Height = 252
Index = 10
Left = 240
TabIndex = 20
Top = 240
Width = 1092
End
Begin VB.Label Label2
Caption = "商品名稱:"
Height = 255
Index = 3
Left = 2880
TabIndex = 19
Top = 240
Width = 1095
End
End
Begin VB.Frame Frame1
Caption = "倉庫選擇:"
Height = 1215
Index = 1
Left = 120
TabIndex = 15
Top = 1440
Width = 5895
Begin VB.ComboBox Combo1
Height = 315
Index = 2
Left = 4080
Style = 2 'Dropdown List
TabIndex = 26
Top = 720
Width = 1572
End
Begin VB.TextBox txtItem
Enabled = 0 'False
Height = 270
Index = 3
Left = 1320
MaxLength = 20
TabIndex = 25
Top = 720
Width = 1455
End
Begin VB.TextBox txtItem
Enabled = 0 'False
Height = 270
Index = 2
Left = 1320
MaxLength = 20
TabIndex = 3
Top = 360
Width = 1455
End
Begin VB.ComboBox Combo1
Height = 315
Index = 1
Left = 4080
Style = 2 'Dropdown List
TabIndex = 4
Top = 360
Width = 1572
End
Begin VB.Label Label2
Caption = "轉(zhuǎn)入倉庫名稱:"
Height = 255
Index = 8
Left = 2880
TabIndex = 28
Top = 720
Width = 1335
End
Begin VB.Label Label2
Caption = "轉(zhuǎn)入倉庫代碼:"
Height = 255
Index = 9
Left = 120
TabIndex = 27
Top = 720
Width = 1455
End
Begin VB.Label Label2
Caption = "轉(zhuǎn)出倉庫名稱:"
Height = 255
Index = 7
Left = 2880
TabIndex = 17
Top = 360
Width = 1575
End
Begin VB.Label Label2
Caption = "轉(zhuǎn)出倉庫代碼:"
Height = 255
Index = 4
Left = 120
TabIndex = 16
Top = 360
Width = 1335
End
End
Begin VB.Frame Frame1
Caption = "轉(zhuǎn)倉單基本信息:"
Height = 1212
Index = 0
Left = 120
TabIndex = 11
Top = 120
Width = 5775
Begin VB.TextBox txtItem
Height = 270
Index = 1
Left = 3960
MaxLength = 20
TabIndex = 2
Top = 360
Width = 1572
End
Begin VB.ComboBox Combo1
Height = 315
Index = 0
Left = 1200
Style = 2 'Dropdown List
TabIndex = 1
Top = 720
Width = 1572
End
Begin VB.TextBox txtItem
Height = 270
Index = 0
Left = 1200
MaxLength = 20
TabIndex = 0
Top = 360
Width = 1572
End
Begin VB.Label Label2
Caption = "轉(zhuǎn)倉單號:"
Height = 255
Index = 5
Left = 240
TabIndex = 14
Top = 360
Width = 1095
End
Begin VB.Label Label2
Caption = "訂貨日期:"
Height = 255
Index = 0
Left = 2880
TabIndex = 13
Top = 360
Width = 975
End
Begin VB.Label Label2
Caption = "業(yè)務(wù)員:"
Height = 255
Index = 1
Left = 240
TabIndex = 12
Top = 720
Width = 1095
End
End
Begin VB.CommandButton cmdExit
Caption = "返回 (&X)"
Height = 375
Left = 3000
TabIndex = 10
Top = 6240
Width = 1215
End
Begin VB.CommandButton cmdSave
Caption = "保存 (&S)"
Height = 375
Left = 1560
TabIndex = 9
Top = 6240
Width = 1215
End
End
Attribute VB_Name = "frmZC1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'是否改動過記錄,ture為改過
Dim mblChange As Boolean
Dim mrc As ADODB.Recordset
Public txtSQL As String
Private Sub cmdExit_Click()
If mblChange And cmdSave.Enabled Then
If MsgBox("保存當(dāng)前記錄的變化嗎?", vbOKCancel + vbExclamation, "警告") = vbOK Then
'保存
Call cmdSave_Click
End If
End If
Unload Me
End Sub
Private Sub cmdSave_Click()
Dim intCount As Integer
Dim sMeg As String
Dim MsgText As String
For intCount = 0 To 4
If Trim(txtItem(intCount) & " ") = "" Then
Select Case intCount
Case 0
sMeg = "轉(zhuǎn)倉單號"
Case 1
sMeg = "轉(zhuǎn)倉日期"
Case 2
sMeg = "轉(zhuǎn)出倉庫代碼"
Case 3
sMeg = "轉(zhuǎn)入倉庫代碼"
Case 4
sMeg = "商品代碼"
End Select
sMeg = sMeg & "不能為空!"
MsgBox sMeg, vbOKOnly + vbExclamation, "警告"
txtItem(intCount).SetFocus
Exit Sub
End If
Next intCount
For intCount = 6 To 7
If Trim(txtItem(intCount) & " ") = "" Then
Select Case intCount
Case 6
sMeg = "商品數(shù)量"
Case 7
sMeg = "總金額"
End Select
sMeg = sMeg & "不能為空!"
MsgBox sMeg, vbOKOnly + vbExclamation, "警告"
txtItem(intCount).SetFocus
Exit Sub
End If
Next intCount
For intCount = 0 To 3
If Trim(Combo1(intCount) & " ") = "" Then
Select Case intCount
Case 0
sMeg = "業(yè)務(wù)員"
Case 1
sMeg = "轉(zhuǎn)出倉庫名稱"
Case 2
sMeg = "轉(zhuǎn)入倉庫名稱"
Case 3
sMeg = "商品名稱"
End Select
sMeg = sMeg & "不能為空!"
MsgBox sMeg, vbOKOnly + vbExclamation, "警告"
Combo1(intCount).SetFocus
Exit Sub
End If
Next intCount
'添加判斷是否有相同的ID記錄
If gintZCmode = 1 Then
txtSQL = "select * from zc where zc_no ='" & Trim(txtItem(0)) & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
If mrc.EOF = False Then
MsgBox "已經(jīng)存在此轉(zhuǎn)倉單編號的記錄!", vbOKOnly + vbExclamation, "警告"
txtItem(0).SetFocus
Exit Sub
End If
mrc.Close
End If
'判斷轉(zhuǎn)出倉庫是否和轉(zhuǎn)入倉庫相同
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -