?
Solved

Blinking controls in Access VBA

Posted on 2011-03-16
13
Medium Priority
?
1,144 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

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 2000 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

752 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