Results 1 to 9 of 9
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Jerky Screen! (A2K)

    This is just one of those small things that enter my life just to annoy me.

    I have a series of forms that I open and close while travelling between them.

    To exit one screen and go to the next, I do this:

    Private Sub txtKeyW_Click()
    DoCmd.OpenForm "frm 00 Menu - 99 Support"
    DoCmd.Close acForm, Me.Name
    End Sub


    Which makes the screen "Jump" up and down once.

    Am I the only lucky one, or has someone else experienced the same problem but were not as anal as I.

    As always, thanks in advance for any help with this,
    Cheers,
    Andy

  2. #2
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jerky Screen! (A2K)

    Try DoCmd.Echo False before and DoCmd.Echo True after to turn off screen updating and then turn it back on again.
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jerky Screen! (A2K)

    Good Boxing Day Morning, Steve!

    It must be the pressure of all the turkey that I ate, because I've managed to not get two simple lines of code to work correctly.

    I tried:

    Private Sub txtKeyW_Click()
    DoCmd.Echo False
    DoCmd.OpenForm "frm 00 Menu - 99 Support"
    DoCmd.Close acForm, Me.Name
    DoCmd.Echo True
    End Sub

    and

    Private Sub txtKeyW_Click()
    DoCmd.Echo False
    DoCmd.OpenForm "frm 00 Menu - 99 Support"
    DoCmd.Echo True
    DoCmd.Close acForm, Me.Name
    End Sub

    and in a moment of coding desparation

    Private Sub txtKeyW_Click()
    DoCmd.Echo False
    DoCmd.OpenForm "frm 00 Menu - 99 Support"
    DoCmd.Close acForm, Me.Name
    ' DoCmd.Echo True
    End Sub

    with the

    DoCmd.Echo True

    in the OnOpen of

    frm 00 Menu - 99 Support

    All to no avail.

    Thanks very kindly for the help, but it appears to possibly not apply in this situation.

    Or I messed up the order somehow,
    Cheers,
    Andy

  4. #4
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jerky Screen! (A2K)

    Do the forms have anything on the On Open or On Close (or maybe even On Load) events. I had inherited a situation where the creator had two sub-reports embedded in the final report. Both subs had a Maximize on the OnOpen and a Restore in the OnClose. I was treated to the window doing a double Max - Restore shuffle on every record change.

  5. #5
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jerky Screen! (A2K)

    Thanks for jumping in with your suggestions. Unfortunately they don't apply in the case.
    What's interesting is that if I "comment out"

    DoCmd.Close acForm, Me.Name

    All works smoothly, but I could end up with a lot of "open" forms lying around. I'm not too sure how bad a thing that is.
    It would be a tradeoff for smooth appearing form actions.
    Cheers,
    Andy

  6. #6
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Jerky Screen! (A2K)

    Could it have anything to do with the size of the forms? Or perhaps their position; that is, are they centered, or fixed-positioned? Does it look like the window scroll bars are being displayed (even if for only an instant)?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  7. #7
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jerky Screen! (A2K)

    'Morning Mark,

    I've pared down the form to one on-click button only and the following code:

    Option Compare Database
    Option Explicit

    Private Sub txtKeyW_Click()
    DoCmd.Echo False
    DoCmd.Close
    DoCmd.OpenForm "frm 00 Menu - 99 Support"
    DoCmd.Echo True
    End Sub

    And it "jerks" ( I wish I had used a better term from the start )

    Comment out the DoCmd.Close and it works but the original form obviously remains open.

    The Form View Bar is closed leaving me with the Title Bar at the top, and the second bar displaying the Close Action Button. Sorry if the names aren't Access-politically correct.

    When I click on the button, the Close Action Bar ( second from the top ) blinks briefly.

    With respect to your comments re the positioning of the form, I'm not too sure what you're referring to specifically.

    Thanks for your comments,
    Cheers,
    Andy

  8. #8
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Jerky Screen! (A2K)

    I was just wondering if the size/position of the 2 forms was causing Access to have to display the scroll bars, but then since one form was then closing immediately, it didn't have to display them any more. This might account for the "jerkiness" you are seeing. Another thought are toolbars. Are they displaying.

    Do you have the Auto Center form property set? If not, try it to see if that doesn't help.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  9. #9
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jerky Screen! (A2K)

    Mark,

    I'm not even sure how to explain this, but many moons ago when granny was a girl. I picked up a piece of macro code which was supposed to hide 'Something'.

    I had in my system a macro called mcrNoMenus with a blank Action and a comment stating "Used for hiding menus".

    In each of my forms in Menu Bar in the properties tab, Other, I had inserted mcrNoMenus.

    I'm quite sure I had a good reason for that, but it totally does not at the moment.

    So, once I deleted mcrNoMenus and deleted the reference in the Menu Bars property, all was well and, if there is such a word, non-jerky.

    I don't think it applies to me at this moment. So, theoretically, all is well.

    Famous Last Words!

    Thanks again to yourself and MBarron for pitching in. I'll try not to bother you folks until next year.
    Cheers,
    Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •