📄 frmoutadd.frm
字号:
VERSION 5.00
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form OutAdd
BorderStyle = 1 'Fixed Single
Caption = "添加出库信息"
ClientHeight = 5580
ClientLeft = 45
ClientTop = 330
ClientWidth = 7290
Icon = "frmOutAdd.frx":0000
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5580
ScaleWidth = 7290
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton cmdClose
Caption = "退出"
Height = 375
Left = 4620
TabIndex = 22
Top = 4950
Width = 915
End
Begin VB.CommandButton cmdCancel
Caption = "取消"
Height = 375
Left = 2910
TabIndex = 21
Top = 4950
Width = 915
End
Begin VB.CommandButton cmdAdd
Caption = "添加"
Height = 375
Left = 1200
TabIndex = 20
Top = 4950
Width = 915
End
Begin TabDlg.SSTab SSTab1
Height = 4575
Left = 210
TabIndex = 0
Top = 150
Width = 6855
_ExtentX = 12091
_ExtentY = 8070
_Version = 393216
Style = 1
Tabs = 2
TabHeight = 520
TabCaption(0) = "基本信息"
TabPicture(0) = "frmOutAdd.frx":0442
Tab(0).ControlEnabled= -1 'True
Tab(0).Control(0)= "Frame1"
Tab(0).Control(0).Enabled= 0 'False
Tab(0).ControlCount= 1
TabCaption(1) = "材料明细"
TabPicture(1) = "frmOutAdd.frx":045E
Tab(1).ControlEnabled= 0 'False
Tab(1).Control(0)= "cmdDelRecord"
Tab(1).Control(1)= "MSFlexGrid1"
Tab(1).Control(2)= "Text7"
Tab(1).Control(3)= "cmdAddRecord"
Tab(1).ControlCount= 4
Begin VB.Frame Frame1
Caption = "出库单基本信息"
Height = 3795
Left = 240
TabIndex = 5
Top = 540
Width = 6375
Begin VB.TextBox Text1
Height = 315
Left = 2160
TabIndex = 12
Top = 480
Width = 2115
End
Begin VB.TextBox Text2
Height = 315
Left = 2160
TabIndex = 11
Top = 945
Width = 2115
End
Begin VB.ComboBox Combo1
Height = 315
Left = 2160
TabIndex = 10
Top = 1395
Width = 2115
End
Begin VB.TextBox Text3
Height = 315
Left = 2160
TabIndex = 9
Top = 1860
Width = 2115
End
Begin VB.TextBox Text4
Height = 315
Left = 2160
TabIndex = 8
Top = 2295
Width = 2115
End
Begin VB.TextBox Text5
Height = 315
Left = 2160
TabIndex = 7
Top = 2730
Width = 2115
End
Begin VB.TextBox Text6
Height = 315
Left = 2160
TabIndex = 6
Top = 3210
Width = 2115
End
Begin VB.Label Label1
Caption = "出库单号码"
Height = 255
Left = 870
TabIndex = 19
Top = 510
Width = 1065
End
Begin VB.Label Label2
Caption = "发票号码"
Height = 255
Left = 870
TabIndex = 18
Top = 975
Width = 1065
End
Begin VB.Label Label3
Caption = "出库类型"
Height = 255
Left = 900
TabIndex = 17
Top = 1425
Width = 1065
End
Begin VB.Label Label4
Caption = "工程号"
Height = 255
Left = 900
TabIndex = 16
Top = 1890
Width = 1065
End
Begin VB.Label Label5
Caption = "出库日期"
Height = 405
Left = 900
TabIndex = 15
Top = 2325
Width = 1065
End
Begin VB.Label Label6
Caption = "经办人"
Height = 255
Left = 900
TabIndex = 14
Top = 2775
Width = 1065
End
Begin VB.Label Label7
Caption = "保管人"
Height = 255
Left = 900
TabIndex = 13
Top = 3240
Width = 1065
End
End
Begin VB.CommandButton cmdAddRecord
Caption = "添加记录"
Height = 375
Left = -73260
TabIndex = 4
Top = 3990
Width = 1005
End
Begin VB.TextBox Text7
Height = 285
Left = -72960
TabIndex = 3
Top = 1350
Width = 945
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Height = 3375
Left = -74730
TabIndex = 2
Top = 390
Width = 6345
_ExtentX = 11192
_ExtentY = 5953
_Version = 393216
End
Begin VB.CommandButton cmdDelRecord
Caption = "删除记录"
Height = 375
Left = -70680
TabIndex = 1
Top = 3990
Width = 1005
End
End
End
Attribute VB_Name = "OutAdd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Myws As Workspace
Dim Mydb As Database
Dim Myrs1 As Recordset
Dim Myrs2 As Recordset
Private Sub cmdAdd_Click()
Dim count As Integer, i As Integer
Dim mrc As Recordset
Dim SQLstring As String, str As String
Dim Num As Integer
Dim price As Single
If Text1.Text = "" Then
MsgBox "出库单号码不能为空,请填写!", vbOKOnly + vbExclamation, "警告"
Text1.SetFocus
Exit Sub
End If
While Myrs1.EOF = False
If Myrs1.Fields(0) = Text1.Text Then
MsgBox "此出库单号码已经存在,请认真核查!", vbOKOnly + vbExclamation, "警告"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Combo1.ListIndex = 0
Text1.SetFocus
Exit Sub
Else
Myrs1.MoveNext
End If
Wend
If Text2.Text = "" Then
MsgBox "发票号码不能为空,请填写!", vbOKOnly + vbExclamation, "警告"
Text2.SetFocus
Exit Sub
End If
If Text4.Text = "" Then
MsgBox "出库日期不能为空,请填写!", vbOKOnly + vbExclamation, "警告"
Text4.SetFocus
Exit Sub
Else
If IsDate(Text4.Text) Then
Text4 = Format(Text4, "yyyy-mm-dd")
Else
MsgBox "出库时间格式应为:yyyy-mm-dd", vbOKOnly + vbExclamation, "警告"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -