I am trying to populate an mshflexgrid with the following code:
private sub loadgrid()
Dim strglacct As String, strdesc As String
'I opened an ADO connection and SQL here.
'
rsAny.MoveFirst
mshfgGJERow.Row = 1
mshfgGJERow.Col = 0
Do While Not rsAny.EOF
strglacct = rsAny!GLAccount
strdesc = rsAny!Description
For J = 1 To mshfgGJERow.Rows - 1
mshfgGJERow.Clip = strglacct & vbTab & strdesc
If Not rsAny.EOF Then
rsAny.MoveNext
Else
Exit Sub
End If
Next
Loop
end sub
'The .clip as explained by MSDN is supposed to load the string into the grid. I verified both strglacct and the strdesc to contain the data from the recordset. When I run the procedure it only loads the strglacct and not the strdesc. Incidentally there was only one record selected and therefore only selecting the first row after the header.
Can anyone help me on this....Thanks in advance...
private sub loadgrid()
Dim strglacct As String, strdesc As String
'I opened an ADO connection and SQL here.
'
rsAny.MoveFirst
mshfgGJERow.Row = 1
mshfgGJERow.Col = 0
Do While Not rsAny.EOF
strglacct = rsAny!GLAccount
strdesc = rsAny!Description
For J = 1 To mshfgGJERow.Rows - 1
mshfgGJERow.Clip = strglacct & vbTab & strdesc
If Not rsAny.EOF Then
rsAny.MoveNext
Else
Exit Sub
End If
Next
Loop
end sub
'The .clip as explained by MSDN is supposed to load the string into the grid. I verified both strglacct and the strdesc to contain the data from the recordset. When I run the procedure it only loads the strglacct and not the strdesc. Incidentally there was only one record selected and therefore only selecting the first row after the header.
Can anyone help me on this....Thanks in advance...