Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to pause the timer

Status
Not open for further replies.

dixxy

Technical User
Joined
Mar 4, 2003
Messages
220
Location
CA
Hello,

I would like to know if there is a way to pause the timer function in a form..

Right now I have this in the on timer event

DoCmd.Requery

the problem is that when i try to edit data the event fires off and I can't put in any data...i need to pause or stop the timer to ba able to add a record.

Can this be done?

Thanks,

Sylvain
 
Have you tried the TimerInterval Property? That might give some help, but I don't think it will allow to completely pause or stop..

Stephen [infinity]
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV
 
How are ya dixxy . . . . .

You can set the T[blue]imer Interval[/blue] to zero, then set it back to what it was . . . . . but my best suggestion . . . . [purple]take the Requery outta there and set the Timer Internal to zero in design view.[/purple]

Problem is (as you've found out) the [blue]On Timer[/blue] event is one of the [blue]worst places[/blue] to put a [purple]Requery[/purple]. Albeit, there are a great many reasons to Requery, but if you have to have it triggered by a timer, continually, [red]your programming is way off[/red].

The question to ask is:

[purple]What reason could you possibly have for doing this?[/purple]

Calvin.gif
See Ya! . . . . . .
 
dixxy . . . . .

Forgive my forwardness in my prior post.

Perhaps if you tell use [blue]what your trying to accomplish, we can help you better![/blue] . . . . .

Calvin.gif
See Ya! . . . . . .
 
You can have a checkBox to detect if you want the code in the timer event to run or not:
Let's call the checkBox chkPause
Code:
If chkPause= False then
docmd.requery
end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top