最新下载
热门教程
- 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"
相关文章
- dw怎么给鱼片添加边框线? dreamweaver图片添加边框的方法 07-08
- ps利用通道和计算对人物进行精细磨皮教程 07-08
- 崩坏星穹铁道白厄值得抽吗-白厄抽取建议 07-08
- 关于早安吸引人的朋友圈 让人一看就赞的早安说说 07-08
- MySQL的核心查询语句详解 07-08
- 龙石战争强力阵容搭配指南 07-08