VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Populate Msflexgrid through Recordset

by romi (2 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 22nd July 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Populate Msflexgrid through Recordset

API Declarations


' in mycase name of msflexgrid is dbplayer

Rate Populate Msflexgrid through Recordset



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

Download this snippet    Add to My Saved Code

Populate Msflexgrid through Recordset Comments

No comments have been posted about Populate Msflexgrid through Recordset. Why not be the first to post a comment about Populate Msflexgrid through Recordset.

Post your comment

Subject:
Message:
0/1000 characters