Public Function AddColumn(Optional Caption As String, Optional Width As Single, Optional Alignment As lgAlignmentEnum = lgAlignLeftCenter, Optional DataType As lgDataTypeEnum = lgString, Optional Format As String) As Long
Public Function AnyRecExist(ByRef vRS As ADODB.Recordset) As Boolean
If vRS.State = adStateClosed Then
AnyRecExist = False
Exit Function
End If
vRS.Requery
If (vRS.BOF = True) And (vRS.EOF = True) Then
AnyRecExist = False
Else
On Error GoTo Errh
vRS.MoveFirst
AnyRecExist = True
End If
Exit Function
'--------------------------
Errh:
AnyRecExist = False
End Function
Private Function ReadField(ByRef vField As Field) As Variant
On Error GoTo Errh
If Not IsNull(vField.Value) Then
ReadField = vField.Value
Else
Select Case vField.Type
Case adBigInt
ReadField = 0
Case adBinary
ReadField = 0
Case adBoolean
ReadField = False
'Case adByRef 'temp
' ReadField = 0
Case adBSTR
ReadField = ""
Case adChar
ReadField = ""
Case adCurrency
ReadField = 0
Case adDate
ReadField = CDate(0)
Case adDBDate
ReadField = CDate(0)
Case adDBTime
ReadField = FormatDateTime(CDate(0), vbLongTime)
Case adDBTimeStamp
ReadField = CDate(0)
Case adDecimal
ReadField = 0
Case adDouble
ReadField = 0
Case adEmpty 'temp
ReadField = ""
Case adError
ReadField = 0
Case adNumeric
ReadField = 0
Case adDouble
ReadField = 0
Case Else
ReadField = ""
End Select
End If
Exit Function
Errh:
ReadField = ""
End Function
Private Function GetRecCount(ByRef vRS As ADODB.Recordset) As Long
If AnyRecExist(vRS) Then
vRS.Requery
vRS.MoveLast
GetRecCount = vRS.RecordCount
Else
GetRecCount = 0
End If
End Function
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdClear,cmdClear,-1,Enabled
Public Property Get ClearEnabled() As Boolean
Attribute ClearEnabled.VB_Description = "Returns/sets a value that determines whether an object can respond to user-generated events."
ClearEnabled = cmdClear.Enabled
End Property
Public Property Let ClearEnabled(ByVal New_ClearEnabled As Boolean)
cmdClear.Enabled() = New_ClearEnabled
PropertyChanged "ClearEnabled"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdPicker,cmdPicker,-1,Enabled
Public Property Get DropEnabled() As Boolean
Attribute DropEnabled.VB_Description = "Returns/sets a value that determines whether an object can respond to user-generated events."
DropEnabled = cmdPicker.Enabled
End Property
Public Property Let DropEnabled(ByVal New_DropEnabled As Boolean)
cmdPicker.Enabled() = New_DropEnabled
PropertyChanged "DropEnabled"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdClear,cmdClear,-1,Picture
Public Property Get ClearIcon() As Picture
Attribute ClearIcon.VB_Description = "Returns/sets a graphic to be displayed in a CommandButton, OptionButton or CheckBox control, if Style is set to 1."
Set ClearIcon = cmdClear.Picture
End Property
Public Property Set ClearIcon(ByVal New_ClearIcon As Picture)
Set cmdClear.Picture = New_ClearIcon
PropertyChanged "ClearIcon"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdPicker,cmdPicker,-1,Picture
Public Property Get DropIcon() As Picture
Attribute DropIcon.VB_Description = "Returns/sets a graphic to be displayed in a CommandButton, OptionButton or CheckBox control, if Style is set to 1."
Set DropIcon = cmdPicker.Picture
End Property
Public Property Set DropIcon(ByVal New_DropIcon As Picture)
Set cmdPicker.Picture = New_DropIcon
PropertyChanged "DropIcon"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=txtDisplay,txtDisplay,-1,Locked
Public Property Get TextLocked() As Boolean
Attribute TextLocked.VB_Description = "Determines whether a control can be edited."
TextLocked = txtDisplay.Locked
End Property
Public Property Let TextLocked(ByVal New_TextLocked As Boolean)
txtDisplay.Locked() = New_TextLocked
PropertyChanged "TextLocked"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MemberInfo=7,0,0,5000
Public Property Get DropWinWidth() As Integer
DropWinWidth = m_DropWinWidth
End Property
Public Property Let DropWinWidth(ByVal New_DropWinWidth As Integer)
m_DropWinWidth = New_DropWinWidth
PropertyChanged "DropWinWidth"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MemberInfo=7,0,0,500
Public Property Get DropWinHeight() As Integer
DropWinHeight = m_DropWinHeight
End Property
Public Property Let DropWinHeight(ByVal New_DropWinHeight As Integer)
m_DropWinHeight = New_DropWinHeight
PropertyChanged "DropWinHeight"
End Property
'Initialize Properties for User Control
Private Sub UserControl_InitProperties()
m_DropWinWidth = m_def_DropWinWidth
m_DropWinHeight = m_def_DropWinHeight
m_DropCaption = m_def_DropCaption
End Sub
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=txtDisplay,txtDisplay,-1,BackColor
Public Property Get BackColor() As OLE_COLOR
Attribute BackColor.VB_Description = "Returns/sets the background color used to display text and graphics in an object."
BackColor = txtDisplay.BackColor
End Property
Public Property Let BackColor(ByVal New_BackColor As OLE_COLOR)
txtDisplay.BackColor() = New_BackColor
PropertyChanged "BackColor"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=txtDisplay,txtDisplay,-1,Locked
Public Property Get Locked() As Boolean
Attribute Locked.VB_Description = "Determines whether a control can be edited."
Locked = txtDisplay.Locked
End Property
Public Property Let Locked(ByVal New_Locked As Boolean)
txtDisplay.Locked() = New_Locked
PropertyChanged "Locked"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,Enabled
Public Property Get Enabled() As Boolean
Attribute Enabled.VB_Description = "Returns/sets a value that determines whether an object can respond to user-generated events."
Enabled = UserControl.Enabled
End Property
Public Property Let Enabled(ByVal New_Enabled As Boolean)
txtDisplay.Enabled = New_Enabled
cmdPicker.Enabled = New_Enabled
cmdClear.Enabled = New_Enabled
UserControl.Enabled() = New_Enabled
PropertyChanged "Enabled"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MemberInfo=13,0,0,Select Entry
Public Property Get DropCaption() As String
DropCaption = m_DropCaption
End Property
Public Property Let DropCaption(ByVal New_DropCaption As String)