473,466 Members | 1,408 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Clock on Form

64 New Member
Good morning.

Is there a way to put a clock on a form? I know you can add a unbound box with default set to now() which gives you a date stamp when the form opens. How do put a clock on a from that keeps the date and time current?

-Tom
Dec 12 '07 #1
5 3938
NeoPa
32,556 Recognized Expert Moderator MVP
I've never had a requirement to do this, but if I had I would firstly look in "MoreControls" in the Toolbox for a predefined clock object when designing a form (I had a quick look and saw nothing). After that, google for one and, if that fails, consider a simple Label control set to Now() but using the Timer Interval & On Timer properties to invoke code to keep it updated.
Dec 12 '07 #2
NeoPa
32,556 Recognized Expert Moderator MVP
If variables are required then you can open the SQL as a recordset and process through it normally. An example of this sort of thing at work can be found in Basic DAO recordset loop using two recordsets.
Dec 12 '07 #3
missinglinq
3,532 Recognized Expert Specialist
[font=Shruti]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 forms property box. Under the Event Tab find Timer Interval and enter 1000.

Expand|Select|Wrap|Line Numbers
  1.     Private Sub Form_Open(Cancel As Integer)
  2.   'Displays while waiting for timer to crank up
  3.   Me.txtOmega = Time 
  4. End Sub
  5.  
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Timer()
  2.  Me.txtOmega = Time 'Display time
  3.  Me.txtDayRunner = Date 'Display date
  4. End Sub
  5.  
And before some says something about Windows already having a clock displayed in the taskbar (and somebody usually does) I run all my apps "full screen mode" as it were, where the Windows clock isn't visible.

Linq ;0)>
Dec 12 '07 #4
tbeers
64 New Member
[font=Shruti]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 forms property box. Under the Event Tab find Timer Interval and enter 1000.

Expand|Select|Wrap|Line Numbers
  1.     Private Sub Form_Open(Cancel As Integer)
  2.   'Displays while waiting for timer to crank up
  3.   Me.txtOmega = Time 
  4. End Sub
  5.  
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Timer()
  2.  Me.txtOmega = Time 'Display time
  3.  Me.txtDayRunner = Date 'Display date
  4. End Sub
  5.  
And before some says something about Windows already having a clock displayed in the taskbar (and somebody usually does) I run all my apps "full screen mode" as it were, where the Windows clock isn't visible.

Linq ;0)>

Perfect! Just what I was looking for.

Thanks

-Tom
Dec 12 '07 #5
missinglinq
3,532 Recognized Expert Specialist
Glad we could help!

Linq ;0)>
Dec 12 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Randy Shore | last post by:
I have developed an Access application that replaces the paper scoresheet scoring for QuizBowl competitions with live, lap-top based scoring. Among other tasks the application displays a score...
2
by: JDW | last post by:
How can I set an analogue clock in a Form ? JDW Belgium Europe.
54
by: CoreyWhite | last post by:
The following experiment is a demonstration of TIME TRAVEL. When writing this program, and testing it out I found that sometimes the program would engage itself in time travel but other times it...
3
by: Avi G | last post by:
Hi, i work with VS 2005 and i need to know how to put the windows time(Clock) on my label that it is on the form that i will see the full time include the second as they move, and i need to know...
4
by: Shawn Yates | last post by:
I am fairly new to MS Access and VB but thanks to many of the posts on this site I have found solutions to my problems. I have been searching all day, however, for an answer to my current problem...
5
by: apartain | last post by:
I wanted to add a clock feature to a form for both Start Time and End Time fields. I followed the instructions from the Help files to make the Start Time work smoothly. The Help files only gave the...
24
by: mohsinalishah444 | last post by:
Dear All, PLZ TELL ME THE SOURCE CODE OF DIGITAL CLOCK IN C LANGUAGE . I REALLY NEED IT AND I DONOT KNOW HOW TO USE C LANGUAGE . ACTUALLY I WANT TO MAKE A CLOCK IN LINUX >IF ANY BODY POST ME THE...
3
by: newkhan | last post by:
Hello, In my recent project I have to make a form in which clock time should be shown. Means my form will be active upto 40 minutes and the time should be shown on form. When user will start...
0
fayazmd
by: fayazmd | last post by:
Hi, I am creating an analog clock on my form by paint method. By default it is displaying at top left corner of my form. i wanted to put that clock wherever i want, means i want to display that...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.