98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsPrevious article Next article Access articles
Insert A Real-Time Clock In An Access Form
Tue 24th May 2011
I have to be careful that I have included all of the steps and in the right order. I also need to be sure that my instructions are clear enough for the reader to be able to follow, as my articles are restricted to text only; they cannot be enhanced by the use of screenshots or other graphics.
A good example of this more technical process appears below. It is the procedure for inserting a real-time clock into an Access form, and it involves several processes, including a foray into the world of Visual Basic. To carry out this operation, which uses Access 2003, you will need to create a new form.
In Design view click on the text box icon and open up a text box on a blank area of the form. You will notice that a small secondary box appears - select this and delete it. With the text box highlighted, right click and select Properties from the menu that appears.
Click on the Other tab and in the Name box type in the name of your text box, Clock1 for example. Select the Format tab and in the list that comes up, go to the Format box. Click on the down arrow that appears and select Long Time from the list. If you do not select this, the box will display the date as well as the time. Scroll further down and you will see boxes to select the font size, colour and alignment etc. A dark 12 point Arial, centred works well. When you are happy with your font, close the Properties menu and you should see that the formatting has been applied. Save and close your document and then reopen it.
At the top left of your screen, where the horizontal and vertical rulers meet, you will see a small square, which is the Form Selecter. Click on this and a black square will appear inside and then right click on it to open a new menu, from which you need to select Properties. Scroll down the list and in the Timer Interval box,enter the value 1000. This equates to one second in milliseconds. In the box above this, On Timer, click on the three dots and select Code Builder from the list. This will open up the Visio Basics editor, at the bottom of which you will find the following text:
Private Sub Form_Timer()
End Sub
Insert your cursor between these two lines of text and type in the following code, which includes whatever name you gave to your text box. Pay particular attention to spacing:
[Clock1] = Now()
Save and close the form and when you reopen it the clock should appear on screen.
This clock is a snappy addition to an Access form. To create it required an assortment of operations, including the exploration of a new drop down menu and entering a short line of Visual Basics code. It is by absorbing these small nuggets of knowledge about an application that we become adept in its use.
There is a whole lot more to Access than standard databases so why not see for yourself just what this excellent application is capable of?
Author is a freelance copywriter. For more information on microsoft access course, please visit https://www.stl-training.co.uk
Original article appears here:
https://www.stl-training.co.uk/article-1687-insert-realtime-clock-in-access-form.html
London's widest choice in
dates, venues, and prices
Public Schedule:
On-site / Closed company:
TestimonialsReal Estate Management (UK) Limited
Operations Manager Jelena Polakova Personal Effectiveness for Managers The course was just right Wolfson Foundation
Head Of Finance Charles Tait Excel Intermediate Jens' enthusiasm put this course apart from other excel training courses I have been on in the past; and the option to be in touch for 2 years afterwards should prove really useful. Goldsmiths
Payroll Administrator Neil Daniels Excel Advanced Don't really have any. Richard was extremely knowledgeable, enthusiastic and patient. |
PUBLICATION GUIDELINES