473,320 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Timer won't start

I want a textbox in an Access97 form to countdown from 100 to 0 when a
command button is clicked. Default Value of textbox is 100.
Currently clicking the command button starts the function running but
not the counter.
What have I done wrong???
Private Sub Form_Timer()
Me.txtCounter = txtCounter - 1
End Sub

Private Sub cmdBuild_Excel_Spreadsheet_Click()
Me.TimerInterval = 1000
Call Copy_Records_to_Excel
Me.TimerInterval = 0
End Sub

Thanks for any suggestions, Rick
Nov 13 '05 #1
1 1704
On 16 Oct 2004 18:15:22 -0700, rb*******@compuserve.com (Rick Brown)
wrote:

If Copy_Records_to_Excel doesn't yield to Windows, no timer event will
ever reach your Form_Timer. Remember: Timer events are low priority,
they don't force a tick every 1000 ms.

Suggestion: a well-placed DoEvents in your Copy_Records_to_Excel
function.

-Tom.

I want a textbox in an Access97 form to countdown from 100 to 0 when a
command button is clicked. Default Value of textbox is 100.
Currently clicking the command button starts the function running but
not the counter.
What have I done wrong???
Private Sub Form_Timer()
Me.txtCounter = txtCounter - 1
End Sub

Private Sub cmdBuild_Excel_Spreadsheet_Click()
Me.TimerInterval = 1000
Call Copy_Records_to_Excel
Me.TimerInterval = 0
End Sub

Thanks for any suggestions, Rick


Nov 13 '05 #2

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

Similar topics

8
by: Daniel P. | last post by:
I'm trying to set a timer that gets called every 3 seconds so I can update a field in the UI with the time elapsed since the process started. What am I doing wrong that timerDF_Tick does not get...
6
by: Dan | last post by:
I've created a pocketpc app which has a startup form containing a listview. The form creates an object which in turn creates a System.Threading.Timer. It keeps track of the Timer state using a...
3
by: jam | last post by:
Dear all, I am wrtiing a console application and doing some test on timer, the below is my sample code I got from some site, but I cannot make it work... Error is 'System.Timers.Timer' does not...
4
by: Dan | last post by:
Hi, I have a timer on a form (System.Windows.Forms.Timer - Framework 1.1) that is set to 60 seconds as sort an of inactivity monitor. If 60 seconds have elapsed without any user activity I want...
4
by: Rich | last post by:
Hello, I am trying to measure the elapsed time between 2 processes. If I declare startTime As Double, endTime as Double and say startTime = Timer .... process1 ....
10
by: moti | last post by:
I need to check for the existence of a file (the filename and folder are known). The file may be created at any time, before or after the start of the file check. As I do not want to burden the...
2
by: John David Thornton | last post by:
I've got a Windows Service class, and I put a System.Threading.Timer, and I've coded it as shown below. However, when I install the service and then start it in MMC, I get a peculiar message: ...
1
by: Dzemo | last post by:
I have windows.forms.timer on my form and this code Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Timer1.Stop() Recieve.Start() End...
4
by: Daniel | last post by:
Hey guys Here is what i want to do. I have made a multiplayer game that needs to when more than one player is ready start a countdown that the clients can see, so players can still join in this...
7
by: seegoon | last post by:
Hi to all. I have a application that receives data via the serial port. I don't know the number of bytes that are going to be coming in. It could be 10 up to 150. (9600 baud) I have decided to...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.