Link to home
Start Free TrialLog in
Avatar of claracruz
claracruz

asked on

Clear MsFlexgrid

hello Experts,

How do I replace the data in an MsFlexgrid with new data at runtime.

at the moment I am doing this;

Private Sub Option1_Click(index As Integer)
    MsFlexgrid1.Clear
    Call AssignPlayers1
    MsFlexgrid1.Cols = rec.Fields.count
   
  With rec
    Do While Not .EOF
        MsFlexgrid1.AddItem vbTab & .Fields(0) & vbTab & .Fields(1) & vbTab & .Fields(2) & vbTab & .Fields(3) & vbTab & .Fields(4) 'until your last fields....
        .MoveNext
    Loop
  End With

this clears the first set of data already there, then loads new data, but the initials rows are not removed, even though the data has been cleared.

thank you.
end sub
ASKER CERTIFIED SOLUTION
Avatar of Sethi
Sethi
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial