jimatqsi 1,277
Recognized Expert Top Contributor
Okay, I bet this is something simple ... I'm running through a pair of loops and I want to show my progress as I go. The outer loop advances through the customer table, the inner loop advances through product classes. Each time I advance to a new customer, I set me!lblCustomer. Caption to be the customer ID, and each time I advance a product class I set me!lblClass.Cap tion to equal the product class. The trouble is, nothing shows in these captions until the very end, after I have displayed my "Done" message. However, if I use the debugger and stop in the loops, the captions display as they should.
I'd appreciate any comments or suggestions.
Jim
Here's my code. It doesn't matter whether grpActionType = 1, 2, or 3, it behaves the same way. 6 2218
Hi. Access takes a relatively lazy approach to screen refresh, so when you change your caption within the loop you should use me.repaint to force a screen refresh (not me.refresh - commented out in line 14, 33 etc).
There are 98 lines listed in your code, of which only a small number are really relevant to your problem. It would certainly help us to read your post more easily if you could simply excerpt the relevant lines instead of posting it all, interesting though it is!
-Stewart
Try using Me.Repaint instead of the Me.Refresh (that you have commented out). Here is the MS Help file on Repaint:
Repaint Method
See AlsoApplies ToExampleSpecif icsThe Repaint method completes any pending screen updates for a specified form. When performed on a form, the Repaint method also completes any pending recalculations of the form's controls.
expression.Repa int
expression Required. An expression that returns one of the objects in the Applies To list.
Remarks
Microsoft Access sometimes waits to complete pending screen updates until it finishes other tasks. With the Repaint method, you can force immediate repainting of the controls on the specified form. You can use the Repaint method:
When you change values in a number of fields. Unless you force a repaint, Microsoft Access might not display the changes immediately, especially if other fields, such as those in an expression in a calculated control, depend on values in the changed fields.
When you want to make sure that a form displays data in all of its fields. For example, fields containing OLE objects often don't display their data immediately after you open a form.
This method doesn't cause a requery of the database, nor does it show new or changed records in the form's underlying record source. You can use the Requery method to requery the source of data for the form or one of its controls.
Notes
Don't confuse the Repaint method with the Refresh method, or with the Refresh command on the Records menu. The Refresh method and Refresh command show changes you or other users have made to the underlying record source for any of the currently displayed records in forms and datasheets. The Repaint method simply updates the screen when repainting has been delayed while Microsoft Access completes other tasks.
The Repaint method differs from the Echo method in that the Repaint method forces a single immediate repaint, while the Echo method turns repainting on or off.
Example
The following example uses the Repaint method to repaint a form when the form receives the focus:
Private Sub Form_Activate()
Me.Repaint
End Sub
Regards,
Scott
Beat me to it, Stewart! Good on you :-)
Regards,
Scott
And , of course, it may simply be that the loop is executing too quickly for the human eye to register the changes in the label caption!
Linq ;0)> jimatqsi 1,277
Recognized Expert Top Contributor
Thanks very much to all who replied, me.repaint did the trick. :)
You're quite welcome! Glad to be able to help.
Regards,
Scott
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Søren Reinke |
last post by:
Hi there
I am working on a program where the user should be able to import some CSV
files.
With my set of test data, it takes about 2 minutes to import, while it is
importing the program sort of freezes.
Therefore i would like to open a little window with a progress bar in it
that shows how far the import has come.
|
by: Kenneth Keeley |
last post by:
Hi,
I have a page that uploads files to my server and I wish to display a
"Please wait while uploading" page to the user while the file is uploading.
I have been able to redirect the user once the file is finished uploading
but am not sure how to do it while file is uploading.
Some sample code would be welcomed with open arms.
Thank You.
|
by: simon |
last post by:
when I execute aspx page, it works about 5 minutes - I calculate some
statistics.
Is there some way, that I can show user time bar or smething similar? That
he nows, that page is working.
Thank you,
Simon
|
by: Raed Sawalha |
last post by:
Dear:
I need to make some progress action when doing long running task to inform
user that something is happening, so I did the following:
1. download a gif file that do some download animation.
2. in my aspx page add DIV and put the image inside it and make it runat
server with initial display as none.
3. in page load for send button i did
btnSend.Attributes = "return SwapButton()"
|
by: Pepi Tonas |
last post by:
I have a form that takes some time to load because it has to populate
some Data. I was trying to display a form on top of it with an
activity bar so that user can see that something's going on.
I have tried doing this and using a progress bar that counts up to 100
and then zeros down so that it should be constantly moving while the
main or background windows finishes loading.
The problem is that the "in progress window" doesn't display...
| |
by: esakal |
last post by:
Hello,
I'm programming an application based on CAB infrastructure in the
client side (c# .net 2005)
Since my application must be sequencally, i wrote all the code in the
UI thread.
my problem occurs when i try to show a progress bar. The screen
freezes. I know i'm not the first one to ask about it. but i'm looking
|
by: eladla |
last post by:
Hi!
I am creating a composite control the does some of it`s own data access.
I want to display a progress bar between the time the page is loaded and the
control place holder is displayed and final display of the data from the
database.
I was thinking of manually opening a second thread in the Render method, but
nothing is displayed before the render method exits anyway.
Anyone know of a good way to do this?
I have been working on this...
|
by: Simon |
last post by:
Hello,
I would like to know if there is a way to display a progressbar while
loading a page.
(We developped our application in Caché (intersystems), some functions need
some time to
calculate&display data, in the mean time I don't want users to stare at an
internet explorer in whitch nothing happens, i want them to see that
something is happening and even better, the status of loading.)
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |