Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Repaint and Access 2007 1

Status
Not open for further replies.

batteam

Programmer
Sep 12, 2003
374
US
I have a form in Access 2007 that is extremely slow to repaint the form after I makes changes to it via VBA code. All works great in Access 2000, but in 2007, it seems to perform the code, the hang for about 5 seconds, then it does the repaint, i.e. the changes on the form as prescribed by my code. I think this is a 2007 bug - anybody know of a work around to speed up making changes on a form? Thanks in advance for any help.
 
The Repaint code doesn't cause any problems in any instance where I've tried it.

How about posting all your code here, where the slow-down is occurring. It's highly likely that the Repaint option is not causing the slow-down in and of itself.

If I had to guess, this could be your whole picture:
1. System with too little resources for some Office 2007 apps - MUCH more resource intensive than Office 2000 especially.

2. Possibly you've got some large bitmap images being repainted on the form - this is not good from a design standpoint, anyhow.

3. Depending upon what your code is, and when this repaint code is running, there are all sorts of possibilities. Without more detail, there isn't much else we can help with.

--

"If to err is human, then I must be some kind of human!" -Me
 
Have you tried adding a DoEvents to your VBA?

Illegitimi non carborundum.
 
Thanks for the responses.

I can wittle my problem down to frame boxes. For whatever reason, Access 2007 just takes a 1/10th of a second to fill an option button in a frame box on the click event, whereas in Access 2000, clicking on the option button fills it instantaneously. For my form, I am clearning labels and assigning a value to over 40 frame boxes on certain routines. I don't know why, but with '07 it then takes 4 seconds or so to do the job. I have two computers at my desk, one with Acc 2000 the other with Acc 2007. I bring up the same program and form and compare the click events on the same frame boxes. There is a very obvious lag in response time with the 2007 form, exact same form, exact same application, exact same code, different versions of Access. Don't know, will continue to look at it but doubt if there's any 'fix'. In the future will have to stay away from frame boxes and option groups as much as possible.

Thanks again for your responses.
 
My 2000 database is a project so its still a project in 2007.
 
batteam,

You say your "project."

Is it an Access Database?

If so, it can be converted from one "version" of Access to another - so it can be converted from 2000 to 2007 and vice versa. genomon is suggesting that if you haven't done so, perhaps you should give it a go, and see if anything changes.

--

"If to err is human, then I must be some kind of human!" -Me
 
When I say project, I mean .adp. Can't convert it to .mdb or .accdb as we have heavy SQL server - tables and sp's - background. Have not given up. The form in question has a subform on it - maybe that has something to do with the way 07 is treating frame boxes on this particular form, as I can't duplicate the slowdown on other forms.
 
Sorry to hear that. It's too bad it's not an option to try. Well, keep tinkering, and be sure to post any questions/thoughts along the way here, since multiple heads are better than one when figuring out a problem. [wink]

--

"If to err is human, then I must be some kind of human!" -Me
 
You might try turning Painting off whle you perform your VBA code then turn it back on. It might be faster than having Access 'stack up' each individual repaints.

Me.Painting = False
 
Well, today our users open the application and brought up the form that was causing all the delays and, wal - ah!. It acted normal, no delays in response time when choosing frame boxes or repainting. What ever was causing the problem went away on its own, which leads one to belive it will probably come back on it own, too.

I don't know what to think. Same version of the app, no compacting done, nothing. This morning it just decided to act normal. Thanks for all you help.
 
Hmm, multiple users... over a network I'm assuming - I didn't re-read the entire thread, and can't remember for sure... if that's the case, then it very well could just be a network issue or server load issue.. wherever the back-end of the database is located...

--

"If to err is human, then I must be some kind of human!" -Me
 
Guess what guys... MS released a 'Hotfix' that solved a memory hogging problem, and that fixed the above problem that I was experiencing with the frame boxes and the form repaint lag time.

Thanks for all your help.
 
Excellent! Thanks for letting us know.

--

"If to err is human, then I must be some kind of human!" -Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top