Form jumps when open

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
 
C

Cameron Sutherland

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top