Results 1 to 2 of 2

Thread: Highlighting a search row in a MSHFlexGrid

  1. #1
    Guest

    Post

    Hi,
    I am trying to assign a record found in a recordset to a MShFlexGrid so that it can display the entire row when a name is seached. I am finding difficulties to assign the property of the MSHFlexGrid that will highlight the row. Here is the code I am using. Any help would be much appreciated. Thanks

    Albert

    If rsData.EOF Then
    MsgBox "Couldn't find the Name"
    Else

    MSHFlexGrid1. = rsData.Fields.("Lastname").Value

    End If

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    Hi Albert

    Code:
        Dim i As Integer
        
        With MSFlexGrid1
            
            .Col = 0
            .Row = 2    'assuming we found match in row 2
            
            For i = 0 To .Cols - 1
                .ColSel = i
            Next i
        End With

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width