Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21243

vb6 need help (Runtime error 3265)

$
0
0
I am searching using combo box, after a few search Runtime error 3265 appears.
And it also happened by scrolling the mouse.

I am using LYNXGRID Control to view records..

Any help?

my Codes :

Code:

Dim sqlCriteria As String
Dim lRow As Long
Dim nCombine As String

    sqlCriteria = "SELECT * FROM sql_Employee WHERE eStatus='" & cboStatus.Text & "' ORDER BY eClient, eLast, eFirst ASC"  ' CRITERIA

With lvEmployee
   
    .Clear                      ' Clear Before Populating Records
   
Set RS = New ADODB.Recordset
    RS.CursorLocation = adUseClient
    RS.CursorType = adOpenForwardOnly
    RS.LockType = adLockReadOnly
   
    RS.Open sqlCriteria, cn
   
       
    Do Until RS.EOF
       
        If RS!eSuffix = "" Then
            nCombine = UCase(RS!eLast) & ", " & StrConv(RS!eFirst, vbProperCase)
        Else
            nCombine = UCase(RS!eLast) & " " & RS!eSuffix & "." & ", " & StrConv(RS!eFirst, vbProperCase)
        End If
           
            lRow = .AddItem(RS!sNumber)
                .CellBackColor(lRow, 0) = &HEDEBE0
                .CellFontBold(lRow, 0) = True
               
                .CellText(lRow, 1) = RS!eStatus
               
                If RS!eStatus = "Active" Then
                .CellForeColor(lRow, 1) = vbBlack
                ElseIf RS!eStatus = "Inactive" Then
                .CellForeColor(lRow, 1) = &H66FF&
                .CellFontBold(lRow, 1) = True
                ElseIf RS!eStatus = "Maternity" Then
                .CellForeColor(lRow, 1) = vbRed
                End If
               
                .CellText(lRow, 2) = RS!eType
               
                If RS!eType = "Regular" Then
                .CellForeColor(lRow, 2) = vbBlack
                ElseIf RS!eType = "Probationary" Then
                .CellForeColor(lRow, 2) = vbRed
                End If
               
                .CellText(lRow, 3) = nCombine
                .CellFontBold(lRow, 3) = True
               
                .CellText(lRow, 4) = RS!eClient
               
                .CellText(lRow, 5) = RS!eArea
                .CellText(lRow, 6) = IIf(IsNull(RS!eStart), "", RS!eStart)
                .CellText(lRow, 7) = IIf(IsNull(RS!eEnd), "", RS!eEnd)
                .CellText(lRow, 8) = RS!cStreet & " " & RS!cBarangay & " " & RS!cMunicipal & " " & RS!cProvince
                .CellText(lRow, 9) = RS!eSSS
                .CellText(lRow, 10) = RS!ePhil
                .CellText(lRow, 11) = RS!eHDMF
               
                If RS!eClearance = "On Process" Then
                .RowBackColor(lRow) = &H80FFFF
                ElseIf RS!eClearance = "Submitted to SSMPC" Then
                .RowBackColor(lRow) = &HFFC0FF
                End If
               
            .RowHeight(lRow) = 50
            .FreezeAtCol = 3
           
    RS.MoveNext
    Loop
   
    .Redraw = True
   
Set RS = Nothing

End With


Viewing all articles
Browse latest Browse all 21243

Trending Articles