home *** CD-ROM | disk | FTP | other *** search
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- END
- Attribute VB_Name = "State"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = True
- Option Explicit
-
- ' the following pertain to being supported by
- ' VBOFCollection, VBOFObjectManager and
- ' VBOFEventManager
- Public ObjectID As Long
- Public ObjectChanged As Long
- Public ObjectAdded As Long
- Public ObjectDeleted As Long
- Public ObjectParentCount As Long
- Public ObjectManager As VBOFObjectManager
-
- Public StateCode As String
- Public StateName As String
- Public CapitalCity As String
- Public Population As Long
-
- Public Function ObjectInitializeFromRecordSet(Optional RecordSet As Variant) As Address
- ' Populate my variables from the RecordSet
- ' (in support of VBOFCollection)
-
- On Local Error Resume Next
-
- StateCode = RecordSet("StateCode") & ""
- StateName = RecordSet("StateName") & ""
- CapitalCity = RecordSet("CapitalCity") & ""
- Population = RecordSet("Population") + 0
-
- ObjectID = RecordSet("ObjectID")
-
- Set ObjectInitializeFromRecordSet = Me
- End Function
-
- Public Function ObjectListBoxValue() As String
- ' Return a String will represent this object
- ' in a ListBox
- ' (in support of VBOFCollection)
-
- ObjectListBoxValue = _
- StateCode & " (" & StateName & ")"
-
- End Function
-
- Public Function ObjectNewInstanceOfMyClass() As State
- ' Return a new instance of this class
- ' (in support of VBOFCollection)
-
- Set ObjectNewInstanceOfMyClass = New State
- End Function
-
- Public Function ObjectDataSource() As String
- ' Return the Data Source with which this Class is associated
- ' (in support of VBOFCollection)
-
- ObjectDataSource = "States"
- End Function
-
-
-