display running time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm still learning and here's the question, is there a way to get a clock or the time to display on a form that shows the real time of day (hours:min:sec) clicking away like it does on a computer? I'm still pretty green so be specific if you can help

Thanks
 
I'm still learning and here's the question, is there a way to get a clock or the time to display on a form that shows the real time of day (hours:min:sec) clicking away like it does on a computer? I'm still pretty green so be specific if you can help.

Thanks

Add an unbound control to the form.
Set it's Format property to
Long Time

Code the Form's Timer event:
[ControlName] = Time

Set the Timer interval to:
1000

That's it.
 
Fre

I opened a new db. Opened a new form in design view, added a text box (unbound). I set the format to long time, no problem. Went to the form properties, to timer and selected the drop down and picked event procedure (hope that was all I had to do). Went back to the text box properties and for control typed in =time also set the interval to 1000. I get the Name# so I'm doing something wrong. Don't mean to be slow, but I guess I am. What did I miss. I'm very very green. You said to use [controlname]=time, do I actually type it in the properties just like that? Or does [controlname] mean something different?
 
Fred

I opened a new db. Opened a new form in design view, added a text
box (unbound). I set the format to long time, no problem. Went to
the form properties, to timer and selected the drop down and picked
event procedure (hope that was all I had to do). Went back to the
text box properties and for control typed in =time also set the
interval to 1000. I get the Name# so I'm doing something wrong.
Don't mean to be slow, but I guess I am. What did I miss. I'm
very very green. You said to use [controlname]=time, do I actually
type it in the properties just like that? Or does [controlname]
mean something different?

EJ,
Always include the relevant part of any previous message when
replying. That way both you and I can reference the previous post and
understand better what is going on. It also makes it easier for
others to understand.

Here is the previous response I made.
Add an unbound control to the form. Set it's Format property to Long
Time

Code the Form's Timer event:
[ControlName] = Time

Set the Timer interval to: 1000

Here's a step-by-step how-to.

Add a new control to the form.
Display it's property sheet.
Click on the OTHER tab.
The first property on this tab is Name.
Write down the control's name.

Display the Form's Property sheet.
Click on the Event Tab.
Find the Timer Interval property.
Set it to 1000.

Find the Timer event.
On that Timer event line write
[Event Procedure]

Then click on the button with the 3 dots that will appear on that
line. When the Timer event code window opens, the cursor will flash
between 2 already existing lines of code.
Right where the cursor is flashing (between those 2 lines) write:
[ControlName] = Time
Now where I have written [ControlName] above you will write the name
of the control you added. If the control name is "Text0", you will
write
[Text0] = Time
[ControlName] is just a generic name telling you that the actual name
of the control belongs there.

Set the Text Control Format to Long Time.

Open the form and it should display a running clock.
 
----- fredg wrote: ----

Fred
I opened a new db. Opened a new form in design view, added a tex
box (unbound). I set the format to long time, no problem. Went t
the form properties, to timer and selected the drop down and picke
event procedure (hope that was all I had to do). Went back to th
text box properties and for control typed in =time also set th
interval to 1000. I get the Name# so I'm doing something wrong.
Don't mean to be slow, but I guess I am. What did I miss. I'
very very green. You said to use [controlname]=time, do I actuall
type it in the properties just like that? Or does [controlname
mean something different

EJ,
Always include the relevant part of any previous message whe
replying. That way both you and I can reference the previous post an
understand better what is going on. It also makes it easier fo
others to understand.

Here is the previous response I made.
Add an unbound control to the form. Set it's Format property to Lon
Time

Code the Form's Timer event:
[ControlName] = Time

Set the Timer interval to: 1000

Here's a step-by-step how-to.

Add a new control to the form
Display it's property sheet
Click on the OTHER tab
The first property on this tab is Name
Write down the control's name

Display the Form's Property sheet
Click on the Event Tab
Find the Timer Interval property
Set it to 1000

Find the Timer event
On that Timer event line writ
[Event Procedure

Then click on the button with the 3 dots that will appear on tha
line. When the Timer event code window opens, the cursor will flas
between 2 already existing lines of code.
Right where the cursor is flashing (between those 2 lines) write
[ControlName] = Time
Now where I have written [ControlName] above you will write the nam
of the control you added. If the control name is "Text0", you wil
writ
[Text0] = Tim
[ControlName] is just a generic name telling you that the actual nam
of the control belongs there

Set the Text Control Format to Long Time

Open the form and it should display a running clock
--
Fred
Please only reply to this newsgroup.
I do not reply to persona
email


Fre

Thanks so much, it works great. I may have one other question in a few days about time, if you don't mind
Thanks again

EJ
 
Back
Top