Solved

MSFlexGrid slow 2nd time around

Posted on 2003-10-28
3
309 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…

932 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

9 Experts available now in Live!

Get 1:1 Help Now