最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
BOM表查询的VB实现方法
时间:2022-07-02 11:13:01 编辑:袖梨 来源:一聚教程网
相关需求及信息请点击这里查看。
用VB代码实现方法
引用:无,部件:无
设计:在Form1中右下角加入一个CommandButton,名称默认为Command1,窗体的AutoRedraw属性设为True
窗体文件一:Form1
Option Explicit
Private mBom As Collection '这是入口的集合
Private mBomReturn As Collection '这是出口的集合,未经处理
Private mBomReturnLast As Collection '这是出口的集合,经过处理
Private Sub AddBomRecord()
'在这里往mBom加入数据库里面的原内容,为求简便,我不想连接数据库
'直接往里面写入记录了,如果需要,你就直接连接数据库,分析一下里面的
'代码,然后再往mBom里面写入记录
'FG SA1 2.0000
'FG SA2 3.0000
'SA1 PT1 4.0000
'SA1 PT2 5.0000
'SA2 PT1 6.0000
'SA2 PT3 7.0000
Dim mBomValue As cBomValue
Set mBomValue = New cBomValue
mBomValue.AssBom = "FG"
mBomValue.BomPoint = "SA1"
mBomValue.Quantity = 2
mBom.Add mBomValue
Set mBomValue = New cBomValue
mBomValue.AssBom = "FG"
mBomValue.BomPoint = "SA2"
mBomValue.Quantity = 3
mBom.Add mBomValue
Set mBomValue = New cBomValue
mBomValue.AssBom = "SA1"
mBomValue.BomPoint = "PT1"
用VB代码实现方法
引用:无,部件:无
设计:在Form1中右下角加入一个CommandButton,名称默认为Command1,窗体的AutoRedraw属性设为True
窗体文件一:Form1
Option Explicit
Private mBom As Collection '这是入口的集合
Private mBomReturn As Collection '这是出口的集合,未经处理
Private mBomReturnLast As Collection '这是出口的集合,经过处理
Private Sub AddBomRecord()
'在这里往mBom加入数据库里面的原内容,为求简便,我不想连接数据库
'直接往里面写入记录了,如果需要,你就直接连接数据库,分析一下里面的
'代码,然后再往mBom里面写入记录
'FG SA1 2.0000
'FG SA2 3.0000
'SA1 PT1 4.0000
'SA1 PT2 5.0000
'SA2 PT1 6.0000
'SA2 PT3 7.0000
Dim mBomValue As cBomValue
Set mBomValue = New cBomValue
mBomValue.AssBom = "FG"
mBomValue.BomPoint = "SA1"
mBomValue.Quantity = 2
mBom.Add mBomValue
Set mBomValue = New cBomValue
mBomValue.AssBom = "FG"
mBomValue.BomPoint = "SA2"
mBomValue.Quantity = 3
mBom.Add mBomValue
Set mBomValue = New cBomValue
mBomValue.AssBom = "SA1"
mBomValue.BomPoint = "PT1"
相关文章
- 币安Megadrop是什么?参与币安Megadrop的完整指南 05-09
- 逆水寒手游任务如何完成 05-09
- 无期迷途狼獾新装束酷夏激漾攻略 05-09
- 恋与深空体力最佳规划推荐理由分享 05-09
- 以闪亮之名羁绊有哪些技能 05-09
- SOL币挖矿与质押教程:完整指南及操作步骤详解 05-09