home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Power Pack / Visual_Basic4_Power_Pack.bin / vb4files / vbof / demomari.cls < prev    next >
Encoding:
Text File  |  1996-11-20  |  1.6 KB  |  62 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "MaritalStatus"
  6. Attribute VB_Creatable = False
  7. Attribute VB_Exposed = True
  8. Option Explicit
  9.  
  10. ' the following pertain to being supported by
  11. '   VBOFCollection, VBOFObjectManager and
  12. '   VBOFEventManager
  13. Public ObjectID As Long
  14. Public ObjectChanged As Long
  15. Public ObjectAdded As Long
  16. Public ObjectDeleted As Long
  17. Public ObjectParentCount As Long
  18. Public ObjectManager As VBOFObjectManager
  19.  
  20. Public MaritalStatusCode As String
  21. Public Description As String
  22. Public Function ObjectInitializeFromRecordSet(Optional RecordSet As Variant) As Address
  23. ' Populate my variables from the RecordSet
  24. '   (in support of VBOFCollection)
  25.  
  26.     On Local Error Resume Next
  27.     
  28.     MaritalStatusCode = RecordSet("MaritalStatusCode")
  29.     Description = RecordSet("Description")
  30.     
  31.     ObjectID = RecordSet("ObjectID")
  32.  
  33.     Set ObjectInitializeFromRecordSet = Me
  34. End Function
  35.  
  36. Public Function ObjectListBoxValue() As String
  37. ' Return a String will represent this object
  38. '   in a ListBox
  39. '   (in support of VBOFCollection)
  40.  
  41.     ObjectListBoxValue = _
  42.         MaritalStatusCode & " (" & Description & ")"
  43.  
  44. End Function
  45.  
  46. Public Function ObjectNewInstanceOfMyClass() As MaritalStatus
  47. ' Return a new instance of this class
  48. '   (in support of VBOFCollection)
  49.  
  50.     Set ObjectNewInstanceOfMyClass = New MaritalStatus
  51. End Function
  52.  
  53. Public Function ObjectDataSource() As String
  54. ' Return the Data Source with which this Class is associated
  55. '   (in support of VBOFCollection)
  56.     
  57.     ObjectDataSource = "MaritalStatusCodes"
  58. End Function
  59.  
  60.  
  61.  
  62.