Dim m_section As String If rs.RecordCount > 0 Then Do While Not rs.EOF If rs.EOF Then Exit Do rowcount = 1 m_section = "" m_section = rs.Fields("section_id").Value ' If m_section = "S03" Then Exit Do flxgd.Cols = flxgd.Cols + 1 flxgd.ColWidth(flxgd.Cols - 1) = 2000 flxgd.TextMatrix(0, flxgd.Cols - 1) = m_section Do While (rs.Fields("section_id").Value) = m_section If (flxgd.Cols - 1) = 1 Then flxgd.TextMatrix(rowcount, 0) = DateValue(rs!s_date) End If flxgd.TextMatrix(rowcount, flxgd.Cols - 1) = rs.Fields("quantity").Value rs.MoveNext flxgd.Rows = flxgd.Rows + 1 flxgd.Row = flxgd.Row + 1 rowcount = rowcount + 1 Loop m_grdwidth = m_grdwidth + 2000 Loop End If
'Make sure your table is not empty If RS.RecordCount = 0 Then Exit Sub 'Make sure the Absolute Position of the record's cursor is at the right position, If not then Exit Sub 'If the Absolute Position reached the last record then Exit Sub. If RS.AbsolutePosition = Val(RS.RecordCount) Then Exit Sub End If 'Navigate [MoveNext] RS_.MoveNext Text1.Text = RS!FieldName1 Text2.Text = RS!FieldName2
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)