Solved

Blinking controls in Access VBA

Posted on 2011-03-16
13
1,100 Views
Last Modified: 2012-05-11
Hi Exprets,

I have a kiosk type form in an Access 2007 application. There is a tab control on the form, and it has 5 tabs.

When the form is entered, the screen flickers many times before the charts and other controls are drawn on each tab.

How can I stop this annoying flicker before someone has a seizure?

Thanks for any help.

0
Comment
Question by:WestCoastHip
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
13 Comments
 
LVL 58
ID: 35146568
Access 2003 had problems with flicker with un-attached labels on tab controls.  I know you siad this is A2007, but it may be the same thing.  Bugs often popup again.

 See if you have any.  When you click on a control in design view, you should see both the control and the label selected.

  If not, click on the label, do a cut, then select the control and do a paste.

JimD.
0
 

Author Comment

by:WestCoastHip
ID: 35146715
Thanks for the tip Jim.

I re-attached the labels to the controls, but it did not remedy the flicker.

Let me know if you have any other ideas.

Thanks,

0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35148765
What is the code on the Enter event of the Form or Tab Control?

See if you have any "Requery" code there.

Also keep in mind that the more complex your forms (Tab controls, Graphics, Overlapping controls, too many controls, recordsets, ActiveXControls, Animations, Sounds, Timer code ...etc), ...the more resources you app uses to "Display" all of this, hence the probability of more "Flicker"

You may be able to do something with the Application.Echo, but let's see if the issue can't be remedied more simply...

JeffCoachman
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

Author Comment

by:WestCoastHip
ID: 35150614
Jeff,

In the form_load, I call docmd.maximize.

If I take that line out, there is not problem......other than the form is not maximized.

I have tried to stop the form App.paint, and turned the echo on and off, but that does not help with the issue.

Thanks
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35150818
Then resize (redesign) the form so that it is nearly full screen.
..and set the BorderStyle to: Dialog
This way, simply opening the form produces a nearly full sized window, thus no need to Maximize, and thus no flicker...


OR, simply change the Access Option: "Document Window Option" to: Tabbed Documents.
This will display view all opened objects (Tables, Forms, Queries, and Reports) in a "Tabbed" fashion, again, eliminating the need for a maximize and the subsequent "Flickering"...

JeffCoachman
0
 

Author Comment

by:WestCoastHip
ID: 35151260
Thanks Jeff.

The problem is that the form has to run maximized in a kiosk.

Tabbed docs are probably not the best for that.

Thanks for looking at it though.

0
 
LVL 21
ID: 35151506
Curious:
Is the Access front end on the machine's local drive?

A possible solution would be to use a loader/splash formt hat opens the other form the form hidden. The splash screen would use a timer event to give the other form time to load all the object before making it visible.



0
 

Author Comment

by:WestCoastHip
ID: 35160647
HiTech,

Yes the front end is on the same PC.

If I remove the docmd.maximize from the form_load, the flicker disappears.

However, I require the form to run maximized.

0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35162238
Try this to open the form:

Private Sub Command0_Click()
MsgBox "Form Hidden"
    DoCmd.OpenForm "frmEmployees", , , , , acHidden
End Sub
...to open the employees form hidden

(Leave your maximize code as-is)

Then do this on the activate event of the form you just opened Hidden
Private Sub Form_Activate()
    Me.Visible = True
End Sub
0
 

Author Comment

by:WestCoastHip
ID: 35168252
Boaq,

Thanks for the info.

I implemented it, and it does not seem to remedy the flicker, however it does make the form invisible.

I think I am going to have to use a splash screen form on a timer.
Thanks
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
ID: 35172718
<however it does make the form invisible.>
...but the code on the Activate event should make it visible...

Or try this to open the form:

Private Sub Command0_Click()
    Application.Echo False
    DoCmd.OpenForm "frmEmployees", , , , , acHidden
End Sub
...to open the employees form hidden

(Leave your maximize code as-is)

Then do this on the activate event of the form you just opened.
Private Sub Form_Activate()
    Application.Echo True
End Sub
0
 

Author Closing Comment

by:WestCoastHip
ID: 35172994
Thanks Boaq!

That is the ticket.

Cheers
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35175491
;-)
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question