Results 1 to 13 of 13
  1. #1
    Lukael is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    239

    Open DB without flickering

    Hello,



    I'm using this way to open my DB:

    Code:
    Private Sub Form_Load()
    
    Application.Echo False
    
     'Hide Access ribbon
     DoCmd.ShowToolbar "Ribbon", acToolbarNo
     
     'Maximize my Form
     DoCmd.Maximize
      
     'maximize main Access window
     DoCmd.RunCommand acCmdAppMaximize
    
    
    Application.Echo True
    
    End Sub
    Problem is that when DB opens, It allways flickers a bit since this code has to be executed. Is there any better way that might open an Access DB like this without any flickering ??

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    sounds like your monitor needs higher refresh rate.

  3. #3
    Lukael is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    239
    Maybe that is cause, I haave never thought of that. Although, this was tested in several monitors - LED in LCD. Flickering is like 1/3 of second, but I'm wondering if there is any other option to open DB like a VB app .

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    if you swap the two maximises around, the form maximise will only be executed once.

    You might also want to consider using the open event which occurs before the load event

    also you could try putting the code, or an adaption of it into an autoexec macro - I assume your front end is using overlapping windows since you are maximising the form, but not clear if your form is popup to maximise to the screen or to the access window (you can set the form to maximised in the form properties). I don't use macros but something like

    hide access window (rather than the ribbon)
    open form (if popop/modal or use windowmode acDialog)
    maximise form (if not set in form properties)

    or if you want to retain the access window

    hide ribbon
    maximise access window
    open form hidden (if maximise not set in form properties)
    maximise form (if not set in form properties)
    make form visible (if maximise not set in form properties)

    alternatively if you are using tabbed forms and maximising to the access window, but don't want to use the tabs, untick the 'display document tabs' option - form will automatically be maximised

    hide ribbon
    maximise access window
    open form

    Another consideration is if your form has subforms. As you probably know, subforms open before the main form and can cause flickering as the code cycles between mainform and subforms - see this link

    https://accessexperts.com/blog/2013/...re-main-forms/

  5. #5
    Lukael is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    239
    Ajax, thanks for response.

    hide access window (rather than the ribbon)
    open form (if popop/modal or use windowmode acDialog)
    maximise form (if not set in form properties)
    How can I hide Access window and maximize form in form properties ? I have tried hiding Access window like that - not working:
    Code:
    DoCmd.RunCommand acCmdWindowHide
    Your second suggestion (making form hidden and then visible) is a slightly better, so I'll use this one for now. Just tell me - do you call this code from Autoexec macro or just form Open_event ?

    I have also tried Autoexec macros, but It didn't perform any better than I allready have.


  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    re my first suggestion, I don't use macro's so I'm assuming it can be done - perhaps it won't work in a macro, it wasn't tested

    re the second suggestion - the autoexec macro -use openform to open hidden (one of the options for windowmode) then to make visible refer to the form's visible property and set to true

    Point is to try to reduce the number of events that are occurring on screen. So you could still use application.echo and see if it makes a difference

    there are some givens - access has to open (visible) before code can run.

    One other point about equipment being the issue, also consider the graphics card.

  7. #7
    Lukael is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    239
    then to make visible refer to the form's visible property and set to true
    I still don't get this. Where is that, I have no such property that applies for form. You mean only in VBA ?

  8. #8
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397

  9. #9
    Lukael is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    239
    Thansk for link, but that's no use for me. Macros causes me headaches, whatever I try I can't get It to work. I'm using Access 2010...

  10. #10
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    OK well, it was just a suggestion - I don't get any flicker so unable to reproduce the issue

  11. #11
    Lukael is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    239
    I tried this (see answer from Daniel):
    http://answers.microsoft.com/en-us/o...a58ecb2?auth=1
    and added OpenForm and MaximizeWindow to macro, naming all AutoExec, and flicker still occurs.

    About your suggestion - did you think like that :

    1. VBA code
    Code:
    Private Sub Form_Open(Cancel As Integer)
    
    DoCmd.ShowToolbar "Ribbon", acToolbarNo
    DoCmd.RunCommand acCmdAppMaximize
    Docmd.Maximize
    End Sub
    2. Then Autoexec macro with SetProperty ?

  12. #12
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    autoexec will run first automatically. you could use it to call some vba code if you want.

    but since all the things you are trying are not improving things, I suspect it is your equipment

  13. #13
    Lukael is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    239
    but since all the things you are trying are not improving things, I suspect it is your equipment
    Yes, probably It is. Thanks for all your reponses though.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. conditional fomatting flickering
    By Lukael in forum Programming
    Replies: 5
    Last Post: 05-26-2016, 01:44 AM
  2. Screen Flickering?
    By EchoEleven in forum Forms
    Replies: 12
    Last Post: 04-22-2016, 06:04 PM
  3. Replies: 1
    Last Post: 02-01-2016, 06:55 AM
  4. On Mouse Move, Flickering
    By 95DSM in forum Programming
    Replies: 1
    Last Post: 01-04-2011, 08:35 AM
  5. Replies: 2
    Last Post: 02-26-2010, 08:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums