Solved

Clear MsFlexgrid

Posted on 2004-04-05
1
1,103 Views
Last Modified: 2013-12-25
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
0
Comment
Question by:claracruz
1 Comment
 
LVL 18

Accepted Solution

by:
Sethi earned 125 total points
ID: 10758890
To remove rows you have to set .Rows property. Example after you clear all data set MsFlexgrid1.Rows=2
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now