473,569 Members | 2,761 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Thermometer form does not repaint - Access looses focus

I'm using Access 2002 on Windows XP PC, 500 megs ram, Front end/back
end app.

I have a simple form that draws a thermometer to indicate progress of
code that is running. The thermometer form sometimes stops advancing
(does not repaint) part way thru it's cycle. If you click the MS
Access window title bar during the cycle, the Access title bar
switches to Access Not Responding. But if I ctrl+Break to stop the
code it is indeed still running. The form just does not show the
progress.

Here's the Sub that changes the form. Meter is the name of the
thermometer form. Box3 is the rectangle on Meter. intPercent1To10 0
is the integer that controls the size of the rectangle.

Sub ShowMeter(strTe xt As String, intPercent1To10 0 As Integer)
Dim frm1 As Form
Set frm1 = Forms!Meter
frm1!Box3.Width = intPercent1To10 0 / 100 * 3 * 1440
frm1!Text0 = strText
frm1.SetFocus
frm1.Repaint
End Sub

This seems to work when the the code is quick. But if the thermometer
is going to take several minutes, then it sometimes stops responding.

Seems like an Access bug. Any help would be appreciated. I've seen
Knowledge Base article 242017 but my form is not modal and I'm not
using an ActiveX.exe.

Joe A
Nov 13 '05 #1
2 5127
"Joe A" <ja****@arenaso ft.com> wrote in message
news:a1******** *************** **@posting.goog le.com...
I'm using Access 2002 on Windows XP PC, 500 megs ram, Front end/back
end app.

I have a simple form that draws a thermometer to indicate progress of
code that is running. The thermometer form sometimes stops advancing
(does not repaint) part way thru it's cycle. If you click the MS
Access window title bar during the cycle, the Access title bar
switches to Access Not Responding. But if I ctrl+Break to stop the
code it is indeed still running. The form just does not show the
progress.

Here's the Sub that changes the form. Meter is the name of the
thermometer form. Box3 is the rectangle on Meter. intPercent1To10 0
is the integer that controls the size of the rectangle.

Sub ShowMeter(strTe xt As String, intPercent1To10 0 As Integer)
Dim frm1 As Form
Set frm1 = Forms!Meter
frm1!Box3.Width = intPercent1To10 0 / 100 * 3 * 1440
frm1!Text0 = strText
frm1.SetFocus
frm1.Repaint
End Sub


I don't know if this will help but try adding a line with DoEvents before
you repaint the form.




Nov 13 '05 #2
John,

Yes!!! :o) You fixed it! :o)

I added
OpenForms = DoEvents ' Yield to operating system.

before the Repaint. Works great! This problem has plagued me for
years. Sometimes when my meter form stops responding the user thinks
my App has frozen and quits the App. If this happens while the code
in the backround is running (perhaps querying the back end file, this
could cause the back end file to get corrupted. Very Bad situation.
Thanks for your help.

Joe A

"John Winterbottom" <as******@hotma il.com> wrote in message news:<2h******* *****@uni-berlin.de>...
"Joe A" <ja****@arenaso ft.com> wrote in message
news:a1******** *************** **@posting.goog le.com...
I'm using Access 2002 on Windows XP PC, 500 megs ram, Front end/back
end app.

I have a simple form that draws a thermometer to indicate progress of
code that is running. The thermometer form sometimes stops advancing
(does not repaint) part way thru it's cycle. If you click the MS
Access window title bar during the cycle, the Access title bar
switches to Access Not Responding. But if I ctrl+Break to stop the
code it is indeed still running. The form just does not show the
progress.

Here's the Sub that changes the form. Meter is the name of the
thermometer form. Box3 is the rectangle on Meter. intPercent1To10 0
is the integer that controls the size of the rectangle.

Sub ShowMeter(strTe xt As String, intPercent1To10 0 As Integer)
Dim frm1 As Form
Set frm1 = Forms!Meter
frm1!Box3.Width = intPercent1To10 0 / 100 * 3 * 1440
frm1!Text0 = strText
frm1.SetFocus
frm1.Repaint
End Sub


I don't know if this will help but try adding a line with DoEvents before
you repaint the form.

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
7460
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on it, a frontend and a backend. Case 1: If vba code on the frontend updates many rows (360,000) on the backend, a form's timer event (from the...
1
2775
by: VM | last post by:
I'm working on a web form that displays the temperature of a certain room and I'd like to display the temperature as a thermometer where I send it the value (eg. 78 degrees F) and the thermometer changes and displays that value. Where can I find a control for a web form that looks like that? Thanks.
1
2568
by: Robert Clark | last post by:
This a pocket pc/smartphone questions mainly, but i thought i'd ask the question in the C# newsgroup. I have a form which i use to display information from a web service. From this form i open another Form. On this form i update the webservice which in turn updates the information displayed on the previous form. When i close this form, I...
6
9112
by: sandy_pt_in | last post by:
Hi, I have modal form which I am showing with some fading effect... (it is like balloon that comes when you receive a mail in the outlook.) But when I show this form, Owner form looses focus. I searched across net & I came across ShowWindow API, It seems working for me ... but the fading effect is not working.Can you please suggest me some...
2
1687
by: Vasilis X | last post by:
Hello. I am using vb.net. On a form i have a picture box and i draw points, lines, arcs etc in it. When i minimize the form and then maximize it again or if the form looses the focus for any reason all graphics are gone and i have to redraw them. Is there a way to make my application to display the graphics all the time?
2
2553
by: rdemyan via AccessMonster.com | last post by:
I have a custom message form that I want to display when the user shuts down my app. Some clean up needs to be done during shutdown and I want to display this form and then display various messages in the label on the form as the shutdown cleanup proceeds. I have a hidden Startup form. So in the Startup form OnClose event, I am loading...
0
1045
by: =?Utf-8?B?TWljaGFlbA==?= | last post by:
Hi Everyone, I have an issue thats bugging me some. I have a search form that I created to search for clients in the database from the Client form. User selects the client from a list and the focus is sent back to the Client form. In the client form I have a combo filled with Client objects. THe problem is that the search form calls a the...
19
3210
by: zacks | last post by:
I have a .NET 2.0 MDI application where the child form has a Tab Control. Each of the Tab in the Tab Control has a Validating event to handle what it should do when the user changes tabs. But these Validating Events are also fired when either the child form or the main (parent) form Close icon is clicked. And I need for these events to know...
1
1787
by: sconard | last post by:
When you create a form based on a table via access 2007 wizard, form will update when moving from field that has changed to another field within form. Each loss of focus in "changed" fields causes update to fire. I have a subform that performed this way until recently. Now you can make changes in a number of fields and subform will not update...
0
7697
marktang
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...
0
7612
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...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7672
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7968
tracyyun
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...
1
5512
isladogs
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...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2113
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
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.