Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

msflexgrid

Status
Not open for further replies.

TondoBoy

Programmer
Mar 22, 2001
31
US
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...


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top