Time Countdown

P

Pam

Hi,
I have a form with a subform that gives start and stop times for shop work
done. There is a text box on subform that calculates the difference. I
have put a text box on the main form that holds the same calculated
difference from the subform. These are the other related text boxes on main
form:

RepairMinutes (total time allowed to complete job)
TimeUsed (total time from calculations on subform)
TimeRemaining (RepairMinutes - TimeUsed)

All these text boxes have been calculated to hold milliseconds. I have a
visible text box that shows TimeRemaining in a time format of
hours:minutes:seconds:milliseconds.

I'm trying to use the Timer event to have the time formated text box
countdown the time remaining once the user clicks start time and begins
working on job again. I've searched and tried the following:
Me.TimeRemaining.value = me.TimeRemaining.value - 1
and get error message #2448 "can't assign a value to this object"

Does anyone have a solution to how I can make this work?
Any help would be greatly appreciated.
Thanks in advance!!
Pam
 
P

Pam

Hi,

I'm sorry to repost, but I've not received a reply and was really hoping
someone may have a solution to help. Thought I would try again.

Thanks in advance,
Pam
 
P

Pam

Doug,

Thank you for picking up question. TimeRemaining is calculated on the form.

RepairMinutes (total time allowed to complete job - entered to field as
total time allowed per job)

TimeUsed (total time from calculations on subform - total sum of starttime
less stoptime)

TimeRemaining (RepairMinutes - TimeUsed)

The only times held in a table are starttime, stoptime and repairminutes.

Pam
 
D

Douglas J. Steele

But how are the values assigned to the text boxes?

Do you have the ControlSource of the text box set to a formula or do you
assign values to the text boxes in code (or in a macro)? If it's in code (or
a macro), where's the code located?
 
P

Pam

ControlSource of textbox set to a formula.

Douglas J. Steele said:
But how are the values assigned to the text boxes?

Do you have the ControlSource of the text box set to a formula or do you
assign values to the text boxes in code (or in a macro)? If it's in code
(or a macro), where's the code located?
 
D

Douglas J. Steele

If textbox TimeRemaining has its control source set to a formula, you cannot
assign it a value.

Try using

Me.TimeRemaining.Requery

instead
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top