Main form flickers when opening a pop-up form

I can't explain the problem, but I found the fix. Make the popup form modal.

1. Personally I hate huge, wide popup forms that take over my whole screen. I find them intrusive and they make me angry as yours did. I moved the form to the second monitor so I could see this webpage but that didn't move the access window and because the form is both popup and Model, I was locked out of the Access window and so had to close the form (at least you didn't remove the x) so I could move the access window to the other screen so I could look at your directions at the same time as the app.
2. The complaints form doesn't need to be that wide.
3. Having two forms bound to the same table open at the same time is the road to disaster. At a minimum, you MUST save the current record BEFORE opening the popup but I would rethink the design.
Hmmm it doesn't seem to work for me. I changed it to modal and it is still flickering...

See attached. Was there anything else you changed?
 

Attachments

Interesting. By the time I got to that point, I had made the mainform a normal form by removing model and popup. since the flicker still happened, it didn't occur to me to go back and redownload the app to go back to ground 0 and just retry the last change.
 
I agree with Pat's comments in general but also didn't find making the popup modal helped reduce flicker
Instead I suggest closing the main form when the popup is opened and reopening it when the popup is closed.
Flicker eliminated completely

You would obviously want to return to the same record in the main form which I haven't done
 

Attachments

@isladogs did you also make the mainform normal instead of modal and popup? It may be the combination of doing that and changing the popup to Modal = yes that fixed the flicker for me or maybe it eventually goes away if you open/close the form enough:)

Also, don't close the first form. Just hide it

Me.Visible = False
DoCmd.OpenForm .... '''''' only works for Model forms
Me.Visible = True

Obviously this only works when the form being opened is model because otherwise, the code in the main form doesn't stop so it would just immediately show the original form after opening the modal and not wait for the form to close.
 
@isladogs did you also make the mainform normal instead of modal and popup? It may be the combination of doing that and changing the popup to Modal = yes that fixed the flicker for me or maybe it eventually goes away if you open/close the form enough:)

No I didn't ... but I have now - still flickers just as before

Also, don't close the first form. Just hide it

Me.Visible = False
DoCmd.OpenForm .... '''''' only works for Model forms
Me.Visible = True

Obviously this only works when the form being opened is model because otherwise, the code in the main form doesn't stop so it would just immediately show the original form after opening the modal and not wait for the form to close.

Yes I did try that & it works whether or not the popup form is modal ...but in neither case does it prevent the flicker.
Even if you prevent screen repainting, it still flickers

The only way I found to prevent any flickering was what I suggested. Close the main form when opening the popup
 
The only way I found to prevent any flickering was what I suggested. Close the main form when opening the popup
You mean hiding it doesn't work?

I wonder if this is a version issue? I'll check mine when I get home.
 
OK, but you might have mentioned the flicker after the reopen. Very strange behavior.
 
I thought this made it clear enough:
Yes I did try that & it works whether or not the popup form is modal ...but in neither case does it prevent the flicker.
Even if you prevent screen repainting, it still flickers
 
I guess I should have interpreted "prevent screen painting" with hiding the form. OK. My bad.
 
I guess I should have interpreted "prevent screen painting" with hiding the form. OK. My bad.

You asked if I had tried hiding the form and I said I had tried that.
As part of that I also tried 'Preventing screen painting' - I meant exactly that - I tried both Application.Echo False and Screen.Painting=False.
Neither stopped the flicker
 
Thanks for the help everyone. I'll probably just keep it the way it is. It's useful to still have the main form open, as you can quickly refer to it without having to exit the pop up form. The flickering is ultimately just a visual nuisance so we can deal with it
 
I hate to post on an old threads but honestly, screen flicker is something I've dealt with for, literally 15 years. I never could quite figure it out, I've read ALLLLLLL the articles and done ALLLLLL the code tricks, echo, paint, modal, disconnected text box labels, converting labels to text boxes, I dont use requery, and I dont use repaint etc etc, I've even used Chat GPT to see anything I may have missed over the years. Believe me I've read dozens of posts on this site and others with nothing working.

Essentially I have an on timer event that runs every 1000ms for a scoreboard and I would see flickers in certain labels that i change the caption, what was goofy is the timer changes each second so it changes obviously but I would reoutput the scores anyway too -- well even not outputting them caused the flicker so it wasn't the frequency of updates causing the flicker. The scoreboard runs across thee extended monitors and they do not have the exact same output. One or two of the forms would flicker and the other would not -- So confusing!

The captions are stand alone and not tied to a text box. The backcolor is Red and the forecolor is yellow for half the scoreboard and the backcolor is blue on the other half of the scoreboard and the forecolor is yellow. The Flicker would come and go over the years flipping between labels seemingly at random with no way for me to fix it, i would do things that "fixed" it and it would come back.

I rencently needed to write a monitor to see the realtime scores and timers for 4 scoreboards at once to project on a tv or projector so i wrote it quickly and the same issue just flickers on labels and picture boxes and made the app look budget.

Well friends I'm here to tell you a defenitive fix for my issue:

This solved my issue 100% and i deployed it across my other forms with flicker and it solve those issues too -- I hope this helps some other poor soul.

So the red and blue boxes and labels i had are right beside each other. But in reality they were overlapping each other, ever so slightly. I used Ctrl + mouse moving size on the lables to make it absolutely precise the flicker was elimited 100% If the labels are touching each other its fine, if they are overlapping each other it is not fine. You can see in the monitor 4 portion such a small gap inbetween the labels -- this solved the issue, I could certainly use the ctrl + mouse to get it perfect but I wanted to leave it to illustrate the fix, on my main scoreboard that flickered I did make the blue and red touch each other pefectly without overlapping and that killed the flicker also!

I felt so excited I knew I had to come here and share this. I realize this may be unrelated to subform or continous form flickers.

Happy Hunting on killing your label flickers!
 

Attachments

  • Main Scoreboard Origional Flicker.png
    Main Scoreboard Origional Flicker.png
    59 KB · Views: 38
  • Monitor4.png
    Monitor4.png
    48.2 KB · Views: 37
Last edited:
@SuperShin
Which version of Access are you using?
I ask as overlapping controls was a known cause of flickering back in the days of Access 2003 but I thought that had been fixed 20 years ago.

Other known causes of flickering include:
  • Using a timer event
  • Using mouse move events
  • opening and closing objects in the background
 
Which version of Access are you using?
i think the OP is not asking any question, in fact he is sharing his experience on eliminating flicker on form.
 
@SuperShin
Which version of Access are you using?
I ask as overlapping controls was a known cause of flickering back in the days of Access 2003 but I thought that had been fixed 20 years ago.

Other known causes of flickering include:
  • Using a timer event
  • Using mouse move events
  • opening and closing objects in the background

I'm on O365 this project has been going since the 2000 version though but obviously i've migrated all the code base and objects to .accdb long ago, and I've had this issue in Access 2000, 2007, 2010 and 2016/365 I did skip 2003 and 2013 in my travels and RTE life.

I will say the score is one big label and the names names / countries are another lable on top of that label the issues were the red and blue overlap so maybe it takes more than 3 to cause the flicker? I dont know but i can say I'm as happy.
 
I slightly modified your app to prove that clicking the button causes the parent form's record to be requeried. This is Access doing its thing, in its infinite wisdom. Nothing you can do about that unless you go to extremes like using an unbound form.
BTW, both the parent and the child form use the same recordsource. Be careful, or "You and another user changed the same record..." error is in your near future.
 
I'm on O365 this project has been going since the 2000 version though but obviously i've migrated all the code base and objects to .accdb long ago, and I've had this issue in Access 2000, 2007, 2010 and 2016/365 I did skip 2003 and 2013 in my travels and RTE life.

I will say the score is one big label and the names names / countries are another lable on top of that label the issues were the red and blue overlap so maybe it takes more than 3 to cause the flicker? I dont know but i can say I'm as happy.
I wonder whether you continued to have problems as the app was originally created back in A2000.
Many of my apps have forms with multiple overlapping controls though normally only one of each group of overlapping controls will ever be visible. I'm not sure whether that makes a difference. but I only experience flickering where I have one or more of the items listed in post #34

Anyway, I'm glad it worked out for you
 
I dont see how, the form that i made from scratch had the issue and it was made natively in O365.

Also between 2000 and 2020 there have been several complete de compiles and re imports of all objects into new clean .accdb

I'm here to say this bug isn't fixed. I tried it on a 3rd form i had a flicker and troubleshoot it directly to that issue of overlap further confirming that was my issue.
 

Users who are viewing this thread

Back
Top Bottom