473,382 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Is there a way to display current date and time on form?

I used =now() in a text box and that nicely displays date and time at
the moment of opening

How would I show updated data?

I thought of an event procedure, but which one would I use since there
really isn't any data choosing or mouse event associated with the
date/time update

Jerry
Jan 12 '06 #1
10 16953
Try the "On Timer" event.

<je*********@pioneer.com> wrote in message
news:ol********************************@4ax.com...
I used =now() in a text box and that nicely displays date and time at
the moment of opening

How would I show updated data?

I thought of an event procedure, but which one would I use since there
really isn't any data choosing or mouse event associated with the
date/time update

Jerry

Jan 12 '06 #2
<je*********@pioneer.com> wrote in message
news:ol********************************@4ax.com...
I used =now() in a text box and that nicely displays date and time at
the moment of opening

How would I show updated data?

I thought of an event procedure, but which one would I use since there
really isn't any data choosing or mouse event associated with the
date/time update

Jerry

You want to show a 'working clock' on your form which just displays the
current time and is not bound to any data? You could use the form's Timer
event and update every minute, second or whatever.

Or are you talking about showing the date and time a record was created or
amended?
Jan 12 '06 #3
je*********@pioneer.com wrote:
I used =now() in a text box and that nicely displays date and time at
the moment of opening

How would I show updated data?

I thought of an event procedure, but which one would I use since there
really isn't any data choosing or mouse event associated with the
date/time update


The forms in Microsoft Access have a Timer event.

For a form named frmMain with a label lblTime, you'd have code that
looks something like this:
Private Sub Form_Load()
With Me
.TimerInterval = 1
End With
End Sub

Private Sub Form_Timer()
with Me
.lblTime.Caption = Now()
End with
End Sub
Jan 12 '06 #4
TimerInterval is milliseconds!

With the TimerInterval set to 1 there will be no 'time' left to do useful stuff ;-)
So I would set the TimerInterval to 1000 if I wanted to get the time correct every second...
But I would not want that... An accuracy of one minute would be enough for me.

Arno R

"Beowulf" <be*****************@hotmail.com> schreef in bericht news:Q6vxf.32001$sa4.22901@trnddc07...
je*********@pioneer.com wrote:
I used =now() in a text box and that nicely displays date and time at
the moment of opening

How would I show updated data?

I thought of an event procedure, but which one would I use since there
really isn't any data choosing or mouse event associated with the
date/time update


The forms in Microsoft Access have a Timer event.

For a form named frmMain with a label lblTime, you'd have code that
looks something like this:


Private Sub Form_Load()
With Me
.TimerInterval = 1
End With
End Sub

Private Sub Form_Timer()
with Me
.lblTime.Caption = Now()
End with
End Sub

Jan 12 '06 #5
Just current date and time

Or are you talking about showing the date and time a record was created or
amended?


Jan 12 '06 #6
what object is on timer associated with
I don't see it in my event procedures for a text box

(VBA newbie)
Jerry

On Thu, 12 Jan 2006 10:00:34 -0600, "paii, Ron" <pa**@packairinc.com>
wrote:
Try the "On Timer" event.


Jan 12 '06 #7
Arno R wrote:
"Beowulf" <be*****************@hotmail.com> schreef in bericht news:Q6vxf.32001$sa4.22901@trnddc07...
je*********@pioneer.com wrote:
I used =now() in a text box and that nicely displays date and time at
the moment of opening

How would I show updated data?

I thought of an event procedure, but which one would I use since there
really isn't any data choosing or mouse event associated with the
date/time update The forms in Microsoft Access have a Timer event.

For a form named frmMain with a label lblTime, you'd have code that
looks something like this:
Private Sub Form_Load()
With Me
.TimerInterval = 1
End With
End Sub

Private Sub Form_Timer()
with Me
.lblTime.Caption = Now()
End with
End Sub


TimerInterval is milliseconds!


Oops. I did say code that looks "something like this", though. I should
have caught that, though. Thanks for the correction.
With the TimerInterval set to 1 there will be no 'time' left to do
useful stuff ;-)
So I would set the TimerInterval to 1000 if I wanted to get the time
correct every second... But I would not want that... An accuracy of
one minute would be enough for me.

Jan 12 '06 #8
<je*********@pioneer.com> wrote in message
news:lb********************************@4ax.com...
Just current date and time

Or are you talking about showing the date and time a record was created or
amended?

Go to the properties of the form
set the Timer Interval to 1000 (this is milliseconds)
go to the On Timer and event and just write something like:
Me.txtTime = Format(Now(), "hh:nn:ss")
Jan 12 '06 #9
works famously
I was looking in the properties of the txt box and could't find timer
there
Thanks all
Jerry

Go to the properties of the form
set the Timer Interval to 1000 (this is milliseconds)
go to the On Timer and event and just write something like:
Me.txtTime = Format(Now(), "hh:nn:ss")


Jan 12 '06 #10
It is a Form event.

<je*********@pioneer.com> wrote in message
news:0g********************************@4ax.com...
what object is on timer associated with
I don't see it in my event procedures for a text box

(VBA newbie)
Jerry

On Thu, 12 Jan 2006 10:00:34 -0600, "paii, Ron" <pa**@packairinc.com>
wrote:
Try the "On Timer" event.

Jan 12 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Monty | last post by:
Let's say you provide an online service from 7:00AM to 6:00PM Eastern Time (daylight time in the summer). Is there way of showing these hours of availability on a web page in the user's local...
34
by: kroger | last post by:
Hi. I am at a loss to decipher why the javascript on my web page: http://www.psych.nmsu.edu/~jkroger/lab/index.html does not display the date correctly in Firefox. Instead of "2005" for the...
3
by: matthewemiclea | last post by:
I am trying to display information in Access on a form that takes information from many different queries and puts them together on a spreadsheet or chart. Some specific info: The information I...
17
by: perryche | last post by:
I have 5records, e.g. Rc1, Rc2, Rc3..., when user open up a form, I want it to open to a particular record (say Rc3) then when user chooses the Record Selector , it will go to Rc2 and , it will go...
3
by: Andrew S. Giles | last post by:
Hello, I am importing a flat text file, and putting it into a datagrid for display on a form. Currently the users have their dates and times seperated. I have two fields, therefore in the...
3
by: Will | last post by:
Hi there .. I wanna know how to display the time in a label and have it change every sec with the system cock ... meaning that its always syncronized with the system clock, Sec per sec. I...
0
by: remya1000 | last post by:
I need to display current month,last 3months,6months and 1year records seperatly. and first i'm tring to display current month's records. and the error i received is this. Microsoft VBScript...
6
by: Gilberto | last post by:
Hello I have a form where the user enters some pricing information. I need to store in the pricing table (fields time and date) the time and date WHEN the information was entered, so that later...
2
by: Vbbeginner07 | last post by:
How to display current date in a datepicker where once we have loaded the datepicker onto form it shows current date,but after some days it shows only the date when it was loaded onto the form,please...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.