»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 11-23-2003, 07:11 PM   #1 (permalink)
Registered User
 
Join Date: May 2003
Location: Louisiana
Posts: 3
grem629 is on a distinguished road
Using the Timer in Access XP

I am trying to display a timer that counts down to zero on a form in Microsoft Access. The actual timer would probably be a text box so that you can edit the time. There will be 4 command buttons: Start, Stop, Reset, and Set Time. Also, the time will be put into a field in a record upon another Onclick procedure. I know that I'll probably need some VB code behind it, but any help would be very much appreciated. Thanx in advance.

grem629 is offline   Reply With Quote
Old 11-24-2003, 02:56 AM   #2 (permalink)
Registered User
 
tchang's Avatar
 
Join Date: Sep 2003
Location: Boston, USA
Posts: 84
tchang is on a distinguished road
one more function will be good put a alarm function with yes or no, so when the count down is done it can make some alarm
__________________
Shuttle sb61G2 (intel 865G)
P4 2.6 with 800fsb @3.23GHz
Corsair XMS Pro (2 X 512)
nVIDIA 4600 Ti
WD Raptor SATA 10k 36G
Sony DVD RW
tchang is offline   Reply With Quote
Old 11-24-2003, 04:40 AM   #3 (permalink)
Registered User
 
Carl-cox-'s Avatar
 
Join Date: Nov 2002
Location: Kent England
Posts: 235
Carl-cox- is on a distinguished road
what you will need is to set a timer up from the visual basic bit

set the interval to 1000 for 1 second

at teh top of the code write

Code:
option explicit  (i think that how you spell it)

Dim count as Integer
timer1.enabled = false
timer1.interval = 1000
inside the timer code put
Code:
count = count - 1
to start it with a button just put
Code:
timer1.enabled = true
and
Code:
timer1.enabled = false
for the stop button

for the reset button just put a value into the count var
Code:
 count = 0
and to set time

Code:
count = txtbox1.text
also if you want to display it in a txtbox just reverse the code above into the timer

so basically the timer is one big loop that keeps doing the commands inside it every second

im not sure about inputting into a database though

hope this will help

Last edited by Carl-cox-; 11-24-2003 at 04:44 AM.
Carl-cox- is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 03:10 AM.