Sub Form Flickering

chrisjames25

Registered User.
Local time
Today, 22:52
Joined
Dec 1, 2014
Messages
404
Hi.

I have a form with a subform embedded. The subform is a continuous form that presents similar to a datasheet (but with added features)

The problem is when i use the scroll bar to go up or down the data, the continuous from starts to flicker so much. Looks very unprofessional and also hard to even see where you are in the data.

Like other posts i cant believe this is what MS intended or that there isnt a solution, i just have no clue what the solution is.

Cheers

Chris
 
Do you have any code running in the main-/sub form?
Do you have split the database in a Front-/Back end database, (if yes, tell how it is set up, SQL-server or ??)?
What is the record source for the main-/sub form, (table or query)?
Else post your database with some sample data!
 
Following on from JHB's comments, in particular, check for timer event code that may be running in the background
 
Hi both. Will try get my database uploaded later on but in meantime just wanted to say thanks for suggestions and give some feedback on what trying to achieve with the form and subform.

As we create products at wokr we give all products a batch name and record various things about the batch. I.e who supplied raw materials. WHen it was prodcued, How many were in the batch etc.

ON the left hand side of the form is the relevant controls to enter the above info and on the right hand side is the subform that shows all the newly inputted data. Once i have finihsed inputting all the new batches i then double check the data entries by looking at the subform and giving it a once over. ONce happy all inputs are correct i click another button on main form that does 1 of the following (not decided which way to go on this yet)

: 1. Appends the inputs in the subform to another table or
2. Marks a check box as true in a field called BatchChecked and the subform for data only shows data for that table that is Batchchecked equals false.

Telling you all above in case this highlights something that may cause error. Like i say ill get database up later on.
 
Actually i have noticed another finished form doing same thing so can post database now.

Database attached.

1)Open Frm_Bed
2) in the subform click on down arrow on vertical scroll bar and watch the flicking occue
3) Hopefully tell me what i have done wrong.
 

Attachments

The forms require tables that you haven't included so it's not possible to do anything with the supplied database.
 
Another possible culprit responsible for Flickering Forms is Conditional Formatting, especially if it is used for a large number of Controls...could that possibly be the case, here?

Linq ;0)>
 
Adding to what ridders wrote, some of the Sub/Function are missing.
An advice when uploading database, download and run it yourself, to see if all are included.
 
Apologies. Now tested and working my end for you to see issue.

Conditional formatting is quite limited. IN fact dont think i have any in the subform.

See uploaded database.

Thanks for continued support and patience
 

Attachments

Have downloaded and run your db and can't reproduce your problem...which makes me wonder about resources on your end, or a video card problem.

Can any reproduce it?

Linq ;0)>
 
Tested on a windows tablet.

Some flickering but not too distracting.
The main place where it flickers is the record number label on the scroll bar

Can't remember how to disable that 'feature'

I haven't looked at the subform code
 
Like others not so much flickers.
What if you show the table direct, does that flickers?
What if you show only the sub form, does that flickers?
Take away the "Alternate Back Color".
Do you've other databases you could compare to?
Could you try the database on another computer?
You could try to create a new database and import all into it!
 
Just had a look at the code in the main form.

You've obviously spent many hours building this up and what you have achieved is quite impressive.
However, I think you've over complicated it and various code items are likely to be 'fighting' each other

You've also made life MUCH harder by not linking main & subform as is the normal method

If you alter either combobox you'll notice the focus stays on that & you have to click outside it to move on. This isn't user friendly.

Each combo and the first textbox has 4 event codes:

attachment.php


The bottom textbox also has 4 events:

attachment.php


On Change runs after each keystroke - do you need it at all - just use after update. Do you really need the GotFocus / LostFocus/ OnEnter code?

Try removing all but AfterUpdate from the property sheet.
How much functionality is lost?
Was it crucial?
Does performance improve?

Now go back to table design

Suggest you create a relationship between the 3 tables and / or a query linking all of them

You have a boolean (Yes/No) field in each table with default value set as "=Yes". Change to True with no equal sign

Your main form is bound only to tbl_Bed. Link to all 3 tables (or the query I mentioned

Could the combos & textbox be bound to the relevant fields?

Link the main & subform with parent child fields
Probably all of NurseryID & GreenhouseID & BedID

WARNING
At this point your carefully constructed code may stop working!
But much of it may now be redundant anyway
Disable almost all code and build it up again.
Keep the after update event code

At the end of all of this, I think you will have a sleeker, faster & much simpler interface & almost certainly less flickering.

It may take you a while but I believe the end result will be worthwhile.
Good luck
 

Attachments

  • Capture1.PNG
    Capture1.PNG
    8.3 KB · Views: 1,250
  • Capture2.PNG
    Capture2.PNG
    10.5 KB · Views: 1,305
Just as another tester - no flickering here either. As per ridders suggestion I would remove the on change in the combo's you only need the AfterUpdate really.

The focus events only appear to be setting colours on the control itself.

Remove the wildcards from your form references in the query - the values are fixed by your combo's, so they are redundant. To get it to display when no value is selected you replace it as follows;

Code:
[COLOR="Green"]Replace[/COLOR] Like "*" & [forms]![Frm_BedAdd]![Cbo_Tier1] 
[COLOR="green"]With[/COLOR] [forms]![Frm_BedAdd]![Cbo_Tier1] Or [forms]![Frm_BedAdd]![Cbo_Tier1] Is Null

This will also reduce your code when you reset the combo's - simply set them to Null.
 
I found that the execution of OnFocus/SetFocus causes the Tab to flicker. Disable OnFocus/SetFocus will stop the flickering.
 

Users who are viewing this thread

Back
Top Bottom