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

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "Gender"
  6. Attribute VB_Creatable = False
  7. Attribute VB_Exposed = False
  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 GenderCode As String
  21. Public Description As String
  22.  
  23. Public Function ObjectInitializeFromRecordSet(Optional RecordSet As Variant) As Address
  24. ' Populate my variables from the RecordSet
  25. '   (in support of VBOFCollection)
  26.  
  27.     On Local Error Resume Next
  28.     
  29.     GenderCode = RecordSet("GenderCode")
  30.     Description = RecordSet("Description")
  31.     
  32.     ObjectID = RecordSet("ObjectID")
  33.  
  34.     Set ObjectInitializeFromRecordSet = Me
  35. End Function
  36.  
  37. Public Function ObjectListBoxValue() As String
  38. ' Return a String will represent this object
  39. '   in a ListBox
  40. '   (in support of VBOFCollection)
  41.  
  42.     ObjectListBoxValue = _
  43.         GenderCode & " (" & Description & ")"
  44.  
  45. End Function
  46.  
  47. Public Function ObjectNewInstanceOfMyClass() As Gender
  48. ' Return a new instance of this class
  49. '   (in support of VBOFCollection)
  50.  
  51.     Set ObjectNewInstanceOfMyClass = New Gender
  52. End Function
  53.  
  54. Public Function ObjectDataSource() As String
  55. ' Return the Data Source with which this Class is associated
  56. '   (in support of VBOFCollection)
  57.     
  58.     ObjectDataSource = "GenderCodes"
  59. End Function
  60.  
  61.  
  62.