Form Flicker

  • Thread starter snelson via AccessMonster.com
  • Start date
S

snelson via AccessMonster.com

I have a database with several forms being loaded from a Main Menu. I
created the command buttons using the tool box. When I open a form I
generally like to close the first one (don't know why) but there appears to
be a slight delay occuring between closing the main menu and opening the form.
(almost a flicker or stutter effect) If I don't close the main menu and open
a form it works ok BUT when I close the form and return to the Main Menu I
find myself with scroll bars and a different size menu (scroll bars are set
to neither).

At the end of the process I can live with it but would like to know if anyone
out there has some thoughts on this

Thanks in advance

Steve
 
J

JimaldoFratelli

Hi Steve

are you using macros or vba to open/close your forms?

i'm using the same approach to a database just now. i have a main menu with
four buttons linked to four forms. i'm using a macro attached to each button
to close the main menu (first) and then open the appropriate form (second).
each of the four forms displays a "menu" button, which in turn, has a macro
attached which closes all open forms (first), and then opens the main menu
(second)

sounds like the same idea, but there is definetly no flicker when i run my
app. which may (or may not) be down to the order you close/open your forms.

jimaldo
 
S

snelson via AccessMonster.com

I am using the 'On Click' Event Procedure as follows

Private Sub frmdefendantopen_Click()
On Error GoTo Err_OpenDefendantForm_Click


Application.Echo True
DoCmd.OpenForm "frmDefendant"
DoCmd.Close A_FORM, "frmCommandCentre"
DoCmd.Maximize
Application.Echo True

Exit_OpenDefendantForm_Click:
Exit Sub

Err_OpenDefendantForm_Click:
MsgBox Err.Description
Resume Exit_OpenDefendantForm_Click

End Sub

I have modified the toolbox wizard setup to come up with the above, not sure
if it is right but have tried several different variants with fairly
different results, the above seems to be the best (of a bad bunch) so far.

Steve
 
J

JimaldoFratelli

Hi Steve

i just started reading "access 2000 programming weekend crash course" which
advises that in some cases writing macros is more efficient than writing VBA,
especially for opening and closing forms...so it could have been your
problems were down to using VBA rather than the order of opening/closing

jimaldo
 
J

JimaldoFratelli

try switching the code to read:

DoCmd.Close A_FORM, "frmCommandCentre"
DoCmd.OpenForm "frmDefendant"

i'm sure doing it in this order will have the desired effect

jimaldo
 
S

snelson via AccessMonster.com

Thanks for the clue, I tried it but it still didn't do what i wanted. It
appears to jump between the opening and closing of forms. Will keep
searching, thanks anyway

Steve
try switching the code to read:

DoCmd.Close A_FORM, "frmCommandCentre"
DoCmd.OpenForm "frmDefendant"

i'm sure doing it in this order will have the desired effect

jimaldo
I am using the 'On Click' Event Procedure as follows
[quoted text clipped - 37 lines]
 
S

snelson via AccessMonster.com

I tried a basic macro that closes the menu and then opens the other form but
still the same jump between opening and closing, will play around with it a
little bit more to see if one is better than the other.

Thanks for the help

Steve
 

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