Realtime clock on a form

  • Follow


Is there an easy way to put a real time clock onto a form and if so can 
anyone explain the process?

Thanks in advance

Andrew J. Brofman
Chief Fire Marshal
Lake Grove, NY

0
Reply firecop1 6/25/2007 10:52:22 PM

Check out http://www.mvps.org/access/forms/frm0032.htm at "The Access Web"

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"firecop1" <ajb5540@optonline.net> wrote in message 
news:7270E693-1F50-444E-A424-9FBD3109467D@microsoft.com...
> Is there an easy way to put a real time clock onto a form and if so can 
> anyone explain the process?
>
> Thanks in advance
>
> Andrew J. Brofman
> Chief Fire Marshal
> Lake Grove, NY
> 


0
Reply Douglas 6/25/2007 11:20:17 PM

On Mon, 25 Jun 2007 18:52:22 -0400, firecop1 wrote:

> Is there an easy way to put a real time clock onto a form and if so can 
> anyone explain the process?
> 
> Thanks in advance
> 
> Andrew J. Brofman
> Chief Fire Marshal
> Lake Grove, NY

Is a Digital clock OK?

Add an unbound text control to the form.
Set it's Format property to Long Time
Name this control "TheTime".

The Long Time format will display the time as
4:17:34 PM

If you wish to include the date as well as the time 
6/25/2007 4:19:17 PM
then set the Format property to General date.

Set the Form's TimerInterval property to
1000
Code the Form's Timer event:
Me![TheTime] = Now()

That should be all you need do.

The time will increment in 1 second intervals.
-- 
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
0
Reply fredg 6/25/2007 11:22:26 PM

Hello, again, Chief!

Here's a thing I use. You'll need a textbox called txtOmega (yeah, I'm a
watch fanatic) and you'll maybe want to add some cosmetics to it, like a
frame around it. If you'd also like to show the date, add a textbox called
txtDayRunner. 

Goto your form’s property box. Under the Event Tab find Timer Interval and
enter 1000. 


Private Sub Form_Open(Cancel As Integer)
'Displays while waiting for timer to crank up    
     Me.txtOmega = Time 
End Sub

Private Sub Form_Timer()
    Me.txtOmega = Time 'Display time
    Me.txtDayRunner = Date 'Display date
End Sub

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200706/1

0
Reply missinglinq 6/25/2007 11:28:04 PM

I can only keep thanking you over and over. sAs you can tell I am not a 
programmer but I am trying my best to make this work...You are helping me 
more than you know.

Thanks for the great advice and I am trying it out now.

Andrew J. Brofman
Chief Fire Marshal
Lake Grove, NY
"missinglinq via AccessMonster.com" <u28780@uwe> wrote in message 
news:743faacb97d6c@uwe...
> Hello, again, Chief!
>
> Here's a thing I use. You'll need a textbox called txtOmega (yeah, I'm a
> watch fanatic) and you'll maybe want to add some cosmetics to it, like a
> frame around it. If you'd also like to show the date, add a textbox called
> txtDayRunner.
>
> Goto your form’s property box. Under the Event Tab find Timer Interval and
> enter 1000.
>
>
> Private Sub Form_Open(Cancel As Integer)
> 'Displays while waiting for timer to crank up
>     Me.txtOmega = Time
> End Sub
>
> Private Sub Form_Timer()
>    Me.txtOmega = Time 'Display time
>    Me.txtDayRunner = Date 'Display date
> End Sub
>
> -- 
> There's ALWAYS more than one way to skin a cat!
>
> Answers/posts based on Access 2000
>
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200706/1
> 

0
Reply firecop1 6/26/2007 1:19:20 AM

Yep worked like a charm however I now see "Calculating..." on the bottom bar 
of the window and every six seconds the entier window flashes twice.

How would i change the time to military?


"firecop1" <ajb5540@optonline.net> wrote in message 
news:C73E90E6-8CD8-4F7D-B45C-FB0B62629BA1@microsoft.com...
>I can only keep thanking you over and over. sAs you can tell I am not a 
>programmer but I am trying my best to make this work...You are helping me 
>more than you know.
>
> Thanks for the great advice and I am trying it out now.
>
> Andrew J. Brofman
> Chief Fire Marshal
> Lake Grove, NY
> "missinglinq via AccessMonster.com" <u28780@uwe> wrote in message 
> news:743faacb97d6c@uwe...
>> Hello, again, Chief!
>>
>> Here's a thing I use. You'll need a textbox called txtOmega (yeah, I'm a
>> watch fanatic) and you'll maybe want to add some cosmetics to it, like a
>> frame around it. If you'd also like to show the date, add a textbox 
>> called
>> txtDayRunner.
>>
>> Goto your form’s property box. Under the Event Tab find Timer Interval 
>> and
>> enter 1000.
>>
>>
>> Private Sub Form_Open(Cancel As Integer)
>> 'Displays while waiting for timer to crank up
>>     Me.txtOmega = Time
>> End Sub
>>
>> Private Sub Form_Timer()
>>    Me.txtOmega = Time 'Display time
>>    Me.txtDayRunner = Date 'Display date
>> End Sub
>>
>> -- 
>> There's ALWAYS more than one way to skin a cat!
>>
>> Answers/posts based on Access 2000
>>
>> Message posted via AccessMonster.com
>> http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200706/1
>>
> 

0
Reply firecop1 6/26/2007 5:22:10 PM

Replace 

Me.txtOmega = Time 

with

Me.txtOmega = Format(Time, "HH:MM:SS")

to get military time.

As to the flickering, is the Timer Interval set to 1000 as opposed to 100? I
saw this behavior when I was developing this routine, but only at lower Timer
Intervals. Check and if it is at 1000, try increasing it in 100 increments
until it disappears.

I have no idea where the "Calculating..." is coming from! Never heard of such
a thing; maybe someone else here has! What version of Access and what Windows
OP are you using? Exactly where is this showing up?

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via http://www.accessmonster.com

0
Reply missinglinq 6/26/2007 6:02:06 PM

Yep, I have the timer set for 1000 and will try to bring it up. The 
"Calculating..." message comes up along the lower frame of the open database 
window. As it alternates with the field type that is currently selected 
along the  bottom frame of the open databse window.

"missinglinq via AccessMonster.com" <u28780@uwe> wrote in message 
news:7449650ffd3cc@uwe...
> Replace
>
> Me.txtOmega = Time
>
> with
>
> Me.txtOmega = Format(Time, "HH:MM:SS")
>
> to get military time.
>
> As to the flickering, is the Timer Interval set to 1000 as opposed to 100? 
> I
> saw this behavior when I was developing this routine, but only at lower 
> Timer
> Intervals. Check and if it is at 1000, try increasing it in 100 increments
> until it disappears.
>
> I have no idea where the "Calculating..." is coming from! Never heard of 
> such
> a thing; maybe someone else here has! What version of Access and what 
> Windows
> OP are you using? Exactly where is this showing up?
>
> -- 
> There's ALWAYS more than one way to skin a cat!
>
> Answers/posts based on Access 2000
>
> Message posted via http://www.accessmonster.com
> 

0
Reply firecop1 6/26/2007 6:17:35 PM

I have to admit, I have no idea of what you're speaking. What version of
Access and what version of Windows are you running? Perhaps Access 2003 or
Access 2007?

firecop1 wrote:
>Yep, I have the timer set for 1000 and will try to bring it up. The 
>"Calculating..." message comes up along the lower frame of the open database 
>window. As it alternates with the field type that is currently selected 
>along the  bottom frame of the open databse window.
>
>> Replace
>>
>[quoted text clipped - 18 lines]
>> Windows
>> OP are you using? Exactly where is this showing up?

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via http://www.accessmonster.com

0
Reply missinglinq 6/27/2007 10:31:46 AM

I M running Access 2007
Ok the best way to describe where the "Calculating...." message is it shows 
up in the same spot where the status bar text shows up as it alternates with 
whatever test is in there for the field that is highlighted.


"missinglinq via AccessMonster.com" <u28780@uwe> wrote in message 
news:745208e515696@uwe...
>I have to admit, I have no idea of what you're speaking. What version of
> Access and what version of Windows are you running? Perhaps Access 2003 or
> Access 2007?
>
> firecop1 wrote:
>>Yep, I have the timer set for 1000 and will try to bring it up. The
>>"Calculating..." message comes up along the lower frame of the open 
>>database
>>window. As it alternates with the field type that is currently selected
>>along the  bottom frame of the open databse window.
>>
>>> Replace
>>>
>>[quoted text clipped - 18 lines]
>>> Windows
>>> OP are you using? Exactly where is this showing up?
>
> -- 
> There's ALWAYS more than one way to skin a cat!
>
> Answers/posts based on Access 2000
>
> Message posted via http://www.accessmonster.com
> 

0
Reply firecop1 6/27/2007 2:57:30 PM

As I said, I've never run into this before, but I post on a number of other
Access forums and will see if I can find out what it's about and if there's a
workaround. I should also add that anytime you post a new question, you need
to be sure and specify that you're using Access 2007! The reason is that
ACC2007 is such a departure from all previous versions that many things that
pertain to it don't pertain to previous versions and vice versa!

Linq

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via http://www.accessmonster.com

0
Reply missinglinq 6/28/2007 5:38:00 PM

Hey, Chief!

I've gotten responses from a number of experts about the "Calculating..."
message and no one can explain why the clock code would bring this about. It
does display if complicated calculations are being done, but there are *no*
calculations in the code I provided. You said that the message "alternates
with the field type that is currently selected." What *field type* ? What is
the exact text that appears?

Have a great weekend!

Linq

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200706/1

0
Reply missinglinq 6/30/2007 5:20:53 PM

Well aside from this the code works very well.. I tweaked the timing 
settings and it is much smoother now.

Thanks Linq

"missinglinq via AccessMonster.com" <u28780@uwe> wrote in message 
news:746254839ce40@uwe...
> As I said, I've never run into this before, but I post on a number of 
> other
> Access forums and will see if I can find out what it's about and if 
> there's a
> workaround. I should also add that anytime you post a new question, you 
> need
> to be sure and specify that you're using Access 2007! The reason is that
> ACC2007 is such a departure from all previous versions that many things 
> that
> pertain to it don't pertain to previous versions and vice versa!
>
> Linq
>
> -- 
> There's ALWAYS more than one way to skin a cat!
>
> Answers/posts based on Access 2000
>
> Message posted via http://www.accessmonster.com
> 

0
Reply firecop1 7/1/2007 1:45:39 PM

HEy, Chief!

I finally heard from an old hand on another site and he suggested trying to
eliminate the problem by writing the time and date to labels instead of text
boxes. If you want to give it a go:

Backup your db file! You really should do this after closing the db anytime
you spend more than 15-20 minutes making changes, and *at least* once a day
if you've used the db!

In Design View

Select  txtOmega 
Goto Format - Change To
Select Label

Repeat these steps for  txtDayRunner 

Then, in code, copy and paste this code over your old code for these two subs
(or insert the code in Form_Open if you have stuff in there not pertaining to
the clock hack) :

Private Sub Form_Open(Cancel As Integer)
'Displays while waiting for timer to crank up
    Me.txtOmega.Caption = Format(Time, "HH:MM:SS")
    Me.txtDayRunner.Caption = Date 'Display date
End Sub
Private Sub Form_Timer()
   Me.txtOmega.Caption = Format(Time, "HH:MM:SS") 'Display time
   Me.txtDayRunner.Caption = Date 'Display date
End Sub

Now, by default the background color of labels is the same as the color of
the form section they appear on, so you'll probably want to change this to
make it stand out. Right click on the label then use 

Fill/Back Color
Font/Fore Color
Special Effect

to change the appearance to something easier on the eye.

Linq

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200707/1

0
Reply missinglinq 7/1/2007 5:36:49 PM

I've got to ask why?  Windows has a clock at the bottom right of the screen
with the exact same time that you will have in your form (as a matter of fact,
I believe the Windows clock is the source of the Access Time.)
I can look right now and tell you my local time is 7:00 PM.
I realize there is a lot of sarcasm in this message but I think sometimes
database designers (Access in particular) try to put too much fluff in the db
just because we can.

firecop1 wrote:
>Is there an easy way to put a real time clock onto a form and if so can 
>anyone explain the process?
>
>Thanks in advance
>
>Andrew J. Brofman
>Chief Fire Marshal
>Lake Grove, NY

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200707/1

0
Reply jahoobob 7/1/2007 11:00:24 PM

There are people who use "full screen" forms for design purposes and/or to
maximize "real estate." And in this case, as noted above, the OP wants the
time display in military time. I don't know anyway to do that in Regional
Settings.

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200707/1

0
Reply missinglinq 7/2/2007 12:26:57 AM

I take that back! You actually can set the display for military time!

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via http://www.accessmonster.com

0
Reply missinglinq 7/2/2007 12:59:59 AM

Just a 'food for thought'.  While the database is in military time I don't 
wat to look over to my system clock and see military time.  I know I had a 
case like this.

-- 
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors 
II

"missinglinq via AccessMonster.com" <u28780@uwe> wrote in message 
news:748be86c2f8c7@uwe...
>I take that back! You actually can set the display for military time!
>
> -- 
> There's ALWAYS more than one way to skin a cat!
>
> Answers/posts based on Access 2000
>
> Message posted via http://www.accessmonster.com
> 


0
Reply Gina 7/2/2007 4:06:18 AM

Sometimes the obvious is not so obvious...
When my Fire Marshals are in their trucks at night and look over at the 
screen it is much easier to see the large yellow/black clock I have on the 
form than it is to see the microscopic clock on the task bar. So in essence 
I am trying to reduce the accident potential. And if your next question is 
why dont  they use the clock on the truck radio....I work for the 
government-there is no radio.

Andy

"jahoobob via AccessMonster.com" <u12179@uwe> wrote in message 
news:748add028d364@uwe...
> I've got to ask why?  Windows has a clock at the bottom right of the 
> screen
> with the exact same time that you will have in your form (as a matter of 
> fact,
> I believe the Windows clock is the source of the Access Time.)
> I can look right now and tell you my local time is 7:00 PM.
> I realize there is a lot of sarcasm in this message but I think sometimes
> database designers (Access in particular) try to put too much fluff in the 
> db
> just because we can.
>
> firecop1 wrote:
>>Is there an easy way to put a real time clock onto a form and if so can
>>anyone explain the process?
>>
>>Thanks in advance
>>
>>Andrew J. Brofman
>>Chief Fire Marshal
>>Lake Grove, NY
>
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200707/1
> 

0
Reply firecop1 7/2/2007 4:31:39 PM

Hey,Chief!

Posters here are just like many people in life, they tend to see the world
thru the narrow viewport of their own experiences, never giving thought that
there may be other realities! Unfortunately, this deosn't keep them from
trying to force their views on others!  My philosophy over the years has been
to simply ignore posters that only criticize without giving any positive
suggestions!

Linq

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200707/1

0
Reply missinglinq 7/2/2007 7:21:35 PM

Okay missing, I guess you are referring to me.  I stated that I had to ask
why.  I didn't try to force my way on anyone as I said sometimes designers
put too much fluff in the db.  The chief, explained why he needs the time in
the form.  I certainly do see that police or fire in a mobile situation need
a large clock and I don't believe this is fluff.
You, sir have shown that your nom de plume is appropro in that you are
missing something when you infer things from a post as you have mine.  You
need to read things more closely before jumping in.

missinglinq wrote:
>Hey,Chief!
>
>Posters here are just like many people in life, they tend to see the world
>thru the narrow viewport of their own experiences, never giving thought that
>there may be other realities! Unfortunately, this deosn't keep them from
>trying to force their views on others!  My philosophy over the years has been
>to simply ignore posters that only criticize without giving any positive
>suggestions!
>
>Linq
>

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200707/1

0
Reply jahoobob 7/2/2007 9:24:32 PM

Wow, jahoobob! My post wasn't a slam at you, or anyone else in particular! I
was just explaining to the Chief, who is new both to Access and the world of
forums,  that many posters only answer posts according to their own
experiences, and if his needs fall outside of those experiences, he needs to
ignore their advice, however well intentioned it was! If I was going to slam
you, I'd call you by name! In point of fact, the only alledged person I've
ever been unkind to, here or on any other forum, is that bane of all of here,
Aaron Kemph, aka Steve, aka whoever's name he's currently hijacking for his
diatribes/advertising! Just as an aside, to anyone else looking in, I
understand tha Kemph has also taken to tracking down posters' email address
when he can, and is emailing them offering his services!

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200707/1

0
Reply missinglinq 7/2/2007 9:48:58 PM

BTW,  jahoobob, I totally agree with your comment about many developers
putting "fluff" into their apps! I make several visits to about six forums a
day, and the day never goes by without my seeing half a dozen or more  posts
from people who want to do the most assinine things with their DBs!  And the
truly sad thing is that these are the same people who don't have a clue about
the most basic functions of Access!

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200707/1

0
Reply missinglinq 7/2/2007 9:55:49 PM

My apologies.  Sorry for jumping to an erroneous conclusion.

missinglinq wrote:
>BTW,  jahoobob, I totally agree with your comment about many developers
>putting "fluff" into their apps! I make several visits to about six forums a
>day, and the day never goes by without my seeing half a dozen or more  posts
>from people who want to do the most assinine things with their DBs!  And the
>truly sad thing is that these are the same people who don't have a clue about
>the most basic functions of Access!
>

-- 
Message posted via http://www.accessmonster.com

0
Reply jahoobob 7/3/2007 12:45:12 AM

As Senor Wences' Pedro used to say,"s'awright!" ;0)>

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200707/1

0
Reply missinglinq 7/3/2007 3:07:26 AM

Hey, Chief!

Unless you need the status bar for some other reason, I think you can get rid
of the "Calculating..." message by simply not displaying the task bar!

Goto Tools - Startup and unchecking the "Display Task Bar"

Linq

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via http://www.accessmonster.com

0
Reply missinglinq 7/3/2007 11:43:56 AM

Linq,
Did just that..

Safe 4th to you
Andy

"missinglinq via AccessMonster.com" <u28780@uwe> wrote in message 
news:749e1a59a4f9e@uwe...
> Hey, Chief!
>
> Unless you need the status bar for some other reason, I think you can get 
> rid
> of the "Calculating..." message by simply not displaying the task bar!
>
> Goto Tools - Startup and unchecking the "Display Task Bar"
>
> Linq
>
> -- 
> There's ALWAYS more than one way to skin a cat!
>
> Answers/posts based on Access 2000
>
> Message posted via http://www.accessmonster.com
> 

0
Reply firecop1 7/4/2007 1:47:04 AM

Stow that bunker gear and grab some R & R, Chief!

Linq

-- 
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via http://www.accessmonster.com

0
Reply missinglinq 7/4/2007 8:42:03 AM

27 Replies
849 Views

(page loaded in 0.447 seconds)

Similiar Articles:































7/31/2012 4:17:58 AM


Reply: