For more information, click here.
Implementation Using VB Code
Reference: None, part: None
DESIGN: Add a CommandButton in the lower right corner of Form1. The default name is Command1, And the AutoRedraw attribute of the form is set to True.
Form file 1: Form1
Option Explicit
Private mBom As Collection 'This is the Collection of entries
Private mBomReturn As Collection 'This is the exit set, not processed
Private mBomReturnLast As Collection 'This is the set of egress, which has been processed
Private Sub AddBomRecord ()
'Here, I want to add the original content in the database to mBom. For convenience, I don't want to connect to the database.
'Write records directly into it. If necessary, you can directly connect to the database and analyze
'Code, and then write records into 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"