📄 bjkc.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form bjkc
BorderStyle = 1 'Fixed Single
Caption = "库存天数限制"
ClientHeight = 4620
ClientLeft = 4605
ClientTop = 2595
ClientWidth = 6900
Icon = "bjkc.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 4620
ScaleWidth = 6900
Begin VB.CommandButton Command2
Caption = "退出(&E)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3600
TabIndex = 3
Top = 4080
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "设置(&S)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1680
TabIndex = 2
Top = 4080
Width = 1215
End
Begin VB.Frame Frame1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 3975
Left = 0
TabIndex = 0
Top = 0
Width = 6855
Begin VB.Data Data3
Caption = "Data3"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 495
Left = 2880
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 2640
Visible = 0 'False
Width = 2055
End
Begin VB.Data Data2
Caption = "Data2"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 495
Left = 2880
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 1800
Visible = 0 'False
Width = 2055
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 495
Left = 2880
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 960
Visible = 0 'False
Width = 2100
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Bindings = "bjkc.frx":0442
Height = 3615
Left = 120
TabIndex = 1
Top = 240
Width = 6615
_ExtentX = 11668
_ExtentY = 6376
_Version = 393216
BackColor = -2147483624
ForeColorFixed = 0
BackColorSel = 64
ForeColorSel = 16777215
GridColorFixed = 64
Enabled = -1 'True
GridLines = 3
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
End
End
Attribute VB_Name = "bjkc"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
kcbjsz.Show
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Activate()
MSFlexGrid1.ColWidth(0) = 200
MSFlexGrid1.ColWidth(1) = 1400
MSFlexGrid1.ColWidth(2) = 1400
MSFlexGrid1.ColWidth(3) = 1400
MSFlexGrid1.ColWidth(4) = 1400
Data1.Recordset.MoveLast
incount = Data1.Recordset.RecordCount
Data1.Recordset.MoveFirst
For i = 1 To incount
If (Date - Data1.Recordset("kssxrq")) > Data1.Recordset("jhtssx") Then
Data2.Recordset.FindFirst "spbh= ' " & Data1.Recordset("spbh") & "'"
If Data2.Recordset.NoMatch = True Then
Data3.Recordset.AddNew
Data3.Recordset("spbh") = Data1.Recordset("spbh")
Data3.Recordset("jhtssx") = Data1.Recordset("jhtssx")
Data3.Recordset("jhtsxx") = Data1.Recordset("jhtsxx")
Data3.Recordset("kssxrq") = Data1.Recordset("kssxrq")
Data3.Recordset.Update
Data3.Refresh
End If
End If
Data1.Recordset.MoveNext
Next
Data1.Recordset.MoveFirst
MSFlexGrid1.TextMatrix(0, 1) = " 商品编号"
MSFlexGrid1.TextMatrix(0, 2) = "进货天数上限"
MSFlexGrid1.TextMatrix(0, 3) = "进货天数下限"
MSFlexGrid1.TextMatrix(0, 4) = " 开始生效日期"
End Sub
Private Sub Form_Load()
Data2.DatabaseName = App.Path & "\db1.mdb"
Data2.RecordSource = "select * from kczk"
Data1.DatabaseName = App.Path & "\db1.mdb"
Data1.RecordSource = "select * from bj "
Data3.DatabaseName = App.Path & "\db1.mdb"
Data3.RecordSource = "select * from tmbj "
End Sub
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
Data3.Recordset.MoveLast
incount = Data3.Recordset.RecordCount
Data3.Recordset.MoveFirst
For i = 1 To incount
Data3.Recordset.Delete
Data3.Recordset.MoveNext
Next
'Data3.Recordset.Update
Data3.Refresh
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -