?
Solved

Blinking controls in Access VBA

Posted on 2011-03-16
13
Medium Priority
?
1,230 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
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
Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

 

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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

839 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