Link to home
Start Free TrialLog in
Avatar of RichNH
RichNH

asked on

Access form displays slowly

I have an Access 2007 form which, when it opens, the controls display one by one rather than showing all at once.  It is a bit of a distraction and I was hoping to come up with a method of getting the form to appear without the popping in of the various controls on the form.  

What I tried to do was set the form's visible property to False at the beginning of the LOAD event and then set it back to True when the form was ready.  The problem is that no matter which event (Current, Activate, Got Focus for the 1st control) I put the me.visible = true statement in the form still displays with a noticable lag in the displaying of controls on the screen.

The lag in time of when the form first appears to when the last control displays is about 1+ second in length.  I know that this doesn't seem long but I would rather have the form display with all controls already displayed on it.

Does anyone have any other ideas or do I have the right idea but am putting the me.visible = true statement in the wrong spot?

Rich
SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America 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
SOLUTION
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
Avatar of RichNH
RichNH

ASKER

I have split the DB into FE/BE and I have removed all the RowSource values from the combo controls and put code into the Form_Current event which sets the recordsource properties if they are = "" and which are executed only when the Form_Load event has been exited.  

The effect I'm looking for is something similar to this:
If I have a displayed form and make that form invisible, then later I make the form visible the form displays with no apparent time spent building it control by control.  It almost seems instantaneous.  I was looking for that effect.  I am executing it over the network, but the not visible/visible test works fine even if it is over the network so the network isn't entering into the picture.  I was trying to get that effect automatically when the form first displays.  Unfortunately no matter which event I put the me.visible = true code in, I still see the form being built.  

It's almost as if the form isn't really built until it is made visible for the first time.
ASKER CERTIFIED SOLUTION
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
SOLUTION
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
Avatar of RichNH

ASKER

There's a bunch of code in the form load and current events.  

When I first enter into Form_Load I set the form visible property = false  (has the form even loaded yet when you enter this event's module?).  I also set a public boolean switch to true to indicate that the I am in the form load event.  When I exit the form load event I set this switch to false.  I test this switch at the top of the form current event and if its true I exit the form current event without executing any code.  So in effect, while form load is executing the form current event doesn't execute any code.

[after some more testing...]

It would appear that the me.visible property doesn't have any effect until after the form is made visible for the first time.  Since it is the speed at which the form is being painted that I have issue with, I'm starting to think that there's not much I can do about the speed at which the form is painted.  I was hoping that I could paint the form while it was invisible, but that doesn't appear to be an option here.  Time to sleep on it I think.
SOLUTION
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
SOLUTION
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
Avatar of RichNH

ASKER

Definitely perceived speed.  But in politcs, perception is reality.  I'm unfamiliar with both open hidden and echo methods.  Let me look into them.
Avatar of RichNH

ASKER

After looking into those options and considering your comments I'm concluding that you are all right, this is not worth the effort.  But I learned something.  :-)

Thank you all for helping me.  I am at a loss as to how to assign points.  My gut feel, because everyone had suggestions and tried to help is to break up the points based on the following portions:

DataBaseMX      2
Mvasilevsky       1
Telynil9               2
ArmenStein         1
RqGrey3             1

Are there any objections to this?
Hey, if you concluded that it's not worth the effort, then I should get ALL the points!  I advised you to swim downstream.  <very big smile>

Seriously, just assign points based on the value you got, it's no big deal.

Cheers,
Armen
Avatar of RichNH

ASKER

Thanks all.