Form jumps when open

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

An application has a main menu. The main menu can call a
number of other menus. When closing a form and returning
to the main menu, the screen appears to "jump" harshly.
This does not happen when opening a form.

Any ideas on how to make the process from closing a form
and returning to a previous form a smoother transition?

Thanks!

Anne
 
Your flicker comes from the lag between the time the old
form is gone and the time it takes to load the new form.
You have two options that will get rid of it.
1. Wrap the closing and opening with the echo command
turning off the screen refreshing:
DoCmd.Echo False 'stop updating display
DoCmd.Close 'close current form
DoCmd.OpenForm "Form2" 'open new form
DoCmd.Echo True 'turn display refresh back on
2. Hide/Show forms instead of opening and closing. If you
preload the forms and just make them visisble/invisible
everything runs much faster so no flicker:
Form1
[Forms]![Form2].Visible = True
[Forms]![Form1].Visible = False
Form2
[Forms]![Form1].Visible = True
[Forms]![Form2].Visible = False
The trick is to make sure both forms are opened already
(or you get an error) and to make the new form visible
before you make the other invisible.

-Cameron Sutherland
 
Back
Top