Solved

MSFlexGrid slow 2nd time around

Posted on 2003-10-28
3
312 Views
Last Modified: 2013-12-25
The problem I'm having is when I try to fill the grid with a different resultset.  The first time it loads it's lightning fast.  The second time I try to load data its very slow.  The order by clause in both statements is indexed.  I'm lost.  It would seem like there is something I'm not doing with the grid

Jim
0
Comment
Question by:JZUPKUS
3 Comments
 
LVL 42

Accepted Solution

by:
frodoman earned 125 total points
ID: 9637974
Try clearing the resultset & grid completely before reloading it.  I found this solved my identical problem.

I can't explain why it worked because it was mainly a trial & error solution but maybe it'll work for you too ;)
0
 
LVL 18

Expert Comment

by:Sethi
ID: 9638154
Please post the code.
0
 

Author Comment

by:JZUPKUS
ID: 9644088
I already use Grid.Clear and closed the resultset.  But, talking/typing this out made me think of something.  The first time the grid is loaded the form is not visible.  So when I went to reload the grid with a different resultset with the form VISIBLE it took a long time.  I added Me.Hide before the load and Me.Show after the grid was populated and it was back to very fast!

This problem has bothered me for a long time and talking it out helped so I'll give you the points Frodoman.  Good thing to remember.  Dec 17th approaches - Return of the King.  

Thanks,
Jim
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

770 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