Visual Basic [Tutorial] - Mengisi Msflexgrid dan MSHflexgrid dari suatu tabel data - (MS Control) PDF Print E-mail
Written by Rizki Noor Hidayat Wijayaź   
Sunday, 23 March 1997
Visual Basic [Tutorial] - Mengisi Msflexgrid dan MSHflexgrid dari suatu tabel data - (Kontrol)
Public Sub populateDB(rss As Recordset)
Dim x As Integer
Dim dbrows As Integer
    dbplayer.Cols = rss.Fields.Count
    dbplayer.Rows = rss.RecordCount + 1
    dbplayer.Row = 0
    Do Until x = dbplayer.Cols
        dbplayer.Col = x
        dbplayer.Text = UCase(rss.Fields(x).Name)
        dbplayer.BackColorSel = &H8000000B
        x = x + 1
    Loop
    x = 0
    
    dbrows = 1
    Do Until dbrows = rss.RecordCount + 1
    Do Until x = dbplayer.Cols
        dbplayer.Col = x
        dbplayer.Row = dbrows
        dbplayer.Text = UCase(rss.Fields(x))
        dbplayer.BackColorSel = &H8000000B
        x = x + 1
    Loop
    x = 0
    dbrows = dbrows + 1
    rss.MoveNext
    Loop
End Sub
Last Updated ( Sunday, 23 March 1997 )