home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Software Sampler
/
Visual_Basic_Software_Sampler_Visual_Basic_Programmers_Journal_June_1996.iso
/
issues
/
04apr96
/
code
/
pcp100.txt
< prev
next >
Wrap
Text File
|
1996-04-24
|
1KB
|
46 lines
Listing 1
Private Sub Form_Load()
Dim SampleEmployee As New Employee
Dim SampleCustomer As New Customer
Dim SampleProduct As New Product
Set Database = _
OpenDatabase(App.Path & _
"\MyDB.MDB")
' retrieve the appropriate rows from the
' Employee Table and instantiate
' Employee objects
SmallBusiness.Employees._
InstantiateFromDatabase _
Parent:=SmallBusiness, _
SampleObject:=SampleEmployee, _
Database:=Database
' set the datEmployees.RecordSet to the
' RecordSet created within the
' DataAwareCollection
Set datEmployees.RecordSet = _
SmallBusiness.Employees.RecordSet
SmallBusiness.Customers._
InstantiateFromDatabase _
Parent:=SmallBusiness, _
SampleObject:=SampleCustomer, _
Database:=Database
Set datCustomers.RecordSet = _
SmallBusiness.Customers.RecordSet
SmallBusiness.Products._
InstantiateFromDatabase _
Parent:=SmallBusiness, _
SampleObject:=SampleProduct, _
Database:=Database
Set datProducts.RecordSet = _
SmallBusiness.Products.RecordSet
End Sub