MSHFlexgrid problem - clicked row isnt selected
Im using the code below to populate an MSHFlexgrid, but when I go to click on a record in the mshflexgrid sometimes I need to click a line below the record I actually want to select...
ie....
row1
row2
row3
blank space
sometimes to select the data in row 3 i need to click the blank space, and to select row 2 i need to select row 3....
Any ideas? I tried adding a .refresh after the data was loaded but that doesnt seem to help. (or maybe i have the refresh in the wrong place.
VB Code:
Dim sconnect As String
Dim sSQL As String
Dim dfwConn As adodb.Connection
Dim datPrimaryRs As New adodb.Recordset
Dim ConnectNames
' set strings
sconnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='" + path + "';Persist Security Info=False"
sSQL = "select id, LastName, FirstName, Address, Relationship from Record where LastName like '" & Text9.Text & "' order by LastName, FirstName ASC"
' open connection
Set dfwConn = New adodb.Connection
dfwConn.Open sconnect
' create a recordset using the provided collection
datPrimaryRs.CursorLocation = adUseClient
datPrimaryRs.Open sSQL, dfwConn, adOpenForwardOnly, adLockReadOnly
Set MSHFlexGrid1.DataSource = datPrimaryRs