Time in Form

  • Thread starter Thread starter Alex Martinez
  • Start date Start date
A

Alex Martinez

Hello,

I am using Access 2002 and I am using a text box to get the time. In the
Data tab in properites I put Now() in the Default Value and in format I am
using Long Time. My problem is that I do not see the seconds change. The
time changing only when I close and open the form. Can somebody help me.
All I want is to see in my form the time for example 10:00:34 AM. Any tips
or help will be apprieciated. Thank you.
 
are you wanting to date/time stamp each new record as it is entered in the
form? or are you wanting to show the current time on the form, like a clock
ticking away the seconds?

very different solutions for those two scenarios. please indicate which one
fits your situation, or describe your goal in more detail - so we can tailor
our suggestions to fit it.

hth
 
ok, do the following:

in the textbox: remove the DefaultValue setting. change the ControlSource
to =Time()
this function displays the current time, automatically formatted as hh:nn:ss
AM/PM. so you don't need to set the textbox's Format property unless you
want a different display.

in the form: set the TimerInterval property to 1000. in the OnTimer event,
double click. the words [Event Procedure] will appear and also a small
button on the right side (...). click the button. the VBA Editor window will
open, with your cursor *already in the correct spot*. paste in the following
code, as

Me!Text1.Requery

replace "Text1" with the correct name of your textbox. save and close the
window. now when you open your form in form view, the textbox will show the
current time, counting off each second just like a digital-display clock.

hth
 
Thanks Tina for all your help.

It seems the time won't show up on my form until I click on it and the
background color changes to white. Although I have a gray background. I
did the date which shows all the time without a problem, but the time is
another matter. If anybody ran into this problem, please let me know.
Thank you in advance.


tina said:
ok, do the following:

in the textbox: remove the DefaultValue setting. change the ControlSource
to =Time()
this function displays the current time, automatically formatted as
hh:nn:ss
AM/PM. so you don't need to set the textbox's Format property unless you
want a different display.

in the form: set the TimerInterval property to 1000. in the OnTimer
event,
double click. the words [Event Procedure] will appear and also a small
button on the right side (...). click the button. the VBA Editor window
will
open, with your cursor *already in the correct spot*. paste in the
following
code, as

Me!Text1.Requery

replace "Text1" with the correct name of your textbox. save and close the
window. now when you open your form in form view, the textbox will show
the
current time, counting off each second just like a digital-display clock.

hth


Alex Martinez said:
Sorry I meant just to show the current time only. Thanks again.
 
when you say "click on it", do you mean you're clicking on the "Time"
textbox control? or just clicking anywhere on the form?

i tested the setup first, on an A2000 database running in Access 2003, and
then gave you the step-by-step instructions of how i set it up, so it
*should* work. did you follow all the instructions? and what version of
Access is your db?


Alex Martinez said:
Thanks Tina for all your help.

It seems the time won't show up on my form until I click on it and the
background color changes to white. Although I have a gray background. I
did the date which shows all the time without a problem, but the time is
another matter. If anybody ran into this problem, please let me know.
Thank you in advance.


tina said:
ok, do the following:

in the textbox: remove the DefaultValue setting. change the ControlSource
to =Time()
this function displays the current time, automatically formatted as
hh:nn:ss
AM/PM. so you don't need to set the textbox's Format property unless you
want a different display.

in the form: set the TimerInterval property to 1000. in the OnTimer
event,
double click. the words [Event Procedure] will appear and also a small
button on the right side (...). click the button. the VBA Editor window
will
open, with your cursor *already in the correct spot*. paste in the
following
code, as

Me!Text1.Requery

replace "Text1" with the correct name of your textbox. save and close the
window. now when you open your form in form view, the textbox will show
the
current time, counting off each second just like a digital-display clock.

hth


Alex Martinez said:
Sorry I meant just to show the current time only. Thanks again.

are you wanting to date/time stamp each new record as it is entered
in
the
form? or are you wanting to show the current time on the form, like a
clock
ticking away the seconds?

very different solutions for those two scenarios. please indicate which
one
fits your situation, or describe your goal in more detail - so we can
tailor
our suggestions to fit it.

hth



Hello,

I am using Access 2002 and I am using a text box to get the time.
In
the
Data tab in properites I put Now() in the Default Value and in format
I
am
using Long Time. My problem is that I do not see the seconds change.
The
time changing only when I close and open the form. Can somebody help me.
All I want is to see in my form the time for example 10:00:34 AM. Any
tips
or help will be apprieciated. Thank you.
 
Hi Tina,

Thanks for responding. I am using Access 2002. When I open the form up I
don't see the time at all. The funny thing is I only will see the time if I
click the time text box. That I don't want I want the time to always appear.
Clicking anywhere in the form besides the time text box will not show the
time at all. I went over your instruction. Something is missing and I
don't know what it is. I am going to try this in Access 2003. Again thanks
for your help. Any tips or suggestions will be appreciated. Thanks.



tina said:
when you say "click on it", do you mean you're clicking on the "Time"
textbox control? or just clicking anywhere on the form?

i tested the setup first, on an A2000 database running in Access 2003, and
then gave you the step-by-step instructions of how i set it up, so it
*should* work. did you follow all the instructions? and what version of
Access is your db?


Alex Martinez said:
Thanks Tina for all your help.

It seems the time won't show up on my form until I click on it and the
background color changes to white. Although I have a gray background.
I
did the date which shows all the time without a problem, but the time is
another matter. If anybody ran into this problem, please let me know.
Thank you in advance.


tina said:
ok, do the following:

in the textbox: remove the DefaultValue setting. change the ControlSource
to =Time()
this function displays the current time, automatically formatted as
hh:nn:ss
AM/PM. so you don't need to set the textbox's Format property unless
you
want a different display.

in the form: set the TimerInterval property to 1000. in the OnTimer
event,
double click. the words [Event Procedure] will appear and also a small
button on the right side (...). click the button. the VBA Editor window
will
open, with your cursor *already in the correct spot*. paste in the
following
code, as

Me!Text1.Requery

replace "Text1" with the correct name of your textbox. save and close the
window. now when you open your form in form view, the textbox will show
the
current time, counting off each second just like a digital-display clock.

hth



Sorry I meant just to show the current time only. Thanks again.

are you wanting to date/time stamp each new record as it is entered in
the
form? or are you wanting to show the current time on the form, like
a
clock
ticking away the seconds?

very different solutions for those two scenarios. please indicate which
one
fits your situation, or describe your goal in more detail - so we
can
tailor
our suggestions to fit it.

hth



Hello,

I am using Access 2002 and I am using a text box to get the time. In
the
Data tab in properites I put Now() in the Default Value and in format
I
am
using Long Time. My problem is that I do not see the seconds change.
The
time changing only when I close and open the form. Can somebody
help
me.
All I want is to see in my form the time for example 10:00:34 AM. Any
tips
or help will be apprieciated. Thank you.
 
hmm, i'm stumped. i double-checked my posted instructions against my "test"
form; nothing missing there. i tried several form setups: unbound form,
bound form, textbox in the header/detail/footer sections, single form /
continuous forms / datasheet, textbox gets the focus when the form opens /
another control gets the focus when the form opens. in all cases, the
textbox performs the same, ticking off the seconds like a digital-display
clock.

if you don't have any luck with your Access 2003 test, i'll take a look at
your db if you want me to. i can send an email to you at the comcast address
below, and you can email a copy of your db to me.

hth


Alex Martinez said:
Hi Tina,

Thanks for responding. I am using Access 2002. When I open the form up I
don't see the time at all. The funny thing is I only will see the time if I
click the time text box. That I don't want I want the time to always appear.
Clicking anywhere in the form besides the time text box will not show the
time at all. I went over your instruction. Something is missing and I
don't know what it is. I am going to try this in Access 2003. Again thanks
for your help. Any tips or suggestions will be appreciated. Thanks.



tina said:
when you say "click on it", do you mean you're clicking on the "Time"
textbox control? or just clicking anywhere on the form?

i tested the setup first, on an A2000 database running in Access 2003, and
then gave you the step-by-step instructions of how i set it up, so it
*should* work. did you follow all the instructions? and what version of
Access is your db?


Alex Martinez said:
Thanks Tina for all your help.

It seems the time won't show up on my form until I click on it and the
background color changes to white. Although I have a gray background.
I
did the date which shows all the time without a problem, but the time is
another matter. If anybody ran into this problem, please let me know.
Thank you in advance.



ok, do the following:

in the textbox: remove the DefaultValue setting. change the ControlSource
to =Time()
this function displays the current time, automatically formatted as
hh:nn:ss
AM/PM. so you don't need to set the textbox's Format property unless
you
want a different display.

in the form: set the TimerInterval property to 1000. in the OnTimer
event,
double click. the words [Event Procedure] will appear and also a small
button on the right side (...). click the button. the VBA Editor window
will
open, with your cursor *already in the correct spot*. paste in the
following
code, as

Me!Text1.Requery

replace "Text1" with the correct name of your textbox. save and close the
window. now when you open your form in form view, the textbox will show
the
current time, counting off each second just like a digital-display clock.

hth



Sorry I meant just to show the current time only. Thanks again.

are you wanting to date/time stamp each new record as it is
entered
in
the
form? or are you wanting to show the current time on the form, like
a
clock
ticking away the seconds?

very different solutions for those two scenarios. please indicate which
one
fits your situation, or describe your goal in more detail - so we
can
tailor
our suggestions to fit it.

hth



Hello,

I am using Access 2002 and I am using a text box to get the time. In
the
Data tab in properites I put Now() in the Default Value and in format
I
am
using Long Time. My problem is that I do not see the seconds change.
The
time changing only when I close and open the form. Can somebody
help
me.
All I want is to see in my form the time for example 10:00:34 AM. Any
tips
or help will be apprieciated. Thank you.
 
Hi Tina,

I got it to work. I use a new form in Access 2002 and this time it works
like a charm. I don't know why it didn't work on my old form, but since I
using a new form it doesn't matter. Again I want to thank you for your time.


tina said:
hmm, i'm stumped. i double-checked my posted instructions against my
"test"
form; nothing missing there. i tried several form setups: unbound form,
bound form, textbox in the header/detail/footer sections, single form /
continuous forms / datasheet, textbox gets the focus when the form opens /
another control gets the focus when the form opens. in all cases, the
textbox performs the same, ticking off the seconds like a digital-display
clock.

if you don't have any luck with your Access 2003 test, i'll take a look at
your db if you want me to. i can send an email to you at the comcast
address
below, and you can email a copy of your db to me.

hth


Alex Martinez said:
Hi Tina,

Thanks for responding. I am using Access 2002. When I open the form up
I
don't see the time at all. The funny thing is I only will see the time
if I
click the time text box. That I don't want I want the time to always appear.
Clicking anywhere in the form besides the time text box will not show the
time at all. I went over your instruction. Something is missing and I
don't know what it is. I am going to try this in Access 2003. Again thanks
for your help. Any tips or suggestions will be appreciated. Thanks.



tina said:
when you say "click on it", do you mean you're clicking on the "Time"
textbox control? or just clicking anywhere on the form?

i tested the setup first, on an A2000 database running in Access 2003, and
then gave you the step-by-step instructions of how i set it up, so it
*should* work. did you follow all the instructions? and what version of
Access is your db?



Thanks Tina for all your help.

It seems the time won't show up on my form until I click on it and the
background color changes to white. Although I have a gray background.
I
did the date which shows all the time without a problem, but the time is
another matter. If anybody ran into this problem, please let me know.
Thank you in advance.



ok, do the following:

in the textbox: remove the DefaultValue setting. change the
ControlSource
to =Time()
this function displays the current time, automatically formatted as
hh:nn:ss
AM/PM. so you don't need to set the textbox's Format property unless
you
want a different display.

in the form: set the TimerInterval property to 1000. in the OnTimer
event,
double click. the words [Event Procedure] will appear and also a small
button on the right side (...). click the button. the VBA Editor window
will
open, with your cursor *already in the correct spot*. paste in the
following
code, as

Me!Text1.Requery

replace "Text1" with the correct name of your textbox. save and
close
the
window. now when you open your form in form view, the textbox will show
the
current time, counting off each second just like a digital-display
clock.

hth



Sorry I meant just to show the current time only. Thanks again.

are you wanting to date/time stamp each new record as it is entered
in
the
form? or are you wanting to show the current time on the form, like
a
clock
ticking away the seconds?

very different solutions for those two scenarios. please indicate
which
one
fits your situation, or describe your goal in more detail - so we
can
tailor
our suggestions to fit it.

hth



Hello,

I am using Access 2002 and I am using a text box to get the
time.
In
the
Data tab in properites I put Now() in the Default Value and in
format
I
am
using Long Time. My problem is that I do not see the seconds
change.
The
time changing only when I close and open the form. Can somebody
help
me.
All I want is to see in my form the time for example 10:00:34
AM.
Any
tips
or help will be apprieciated. Thank you.
 
oh, you're very welcome Alex, i'm so glad you got it to work - thanks for
posting back to let me know. :)
it's possible your previous form had become corrupted, that happens
sometimes. also, it wouldn't hurt to turn OFF the Name AutoCorrect option in
your db, if it isn't off already - default setting is ON, so if you haven't
turned it off, it is on (Tools | Options | General tab). it's a ratty option
that can cause all sorts of weird problems, so you never know...


Alex Martinez said:
Hi Tina,

I got it to work. I use a new form in Access 2002 and this time it works
like a charm. I don't know why it didn't work on my old form, but since I
using a new form it doesn't matter. Again I want to thank you for your time.


tina said:
hmm, i'm stumped. i double-checked my posted instructions against my
"test"
form; nothing missing there. i tried several form setups: unbound form,
bound form, textbox in the header/detail/footer sections, single form /
continuous forms / datasheet, textbox gets the focus when the form opens /
another control gets the focus when the form opens. in all cases, the
textbox performs the same, ticking off the seconds like a digital-display
clock.

if you don't have any luck with your Access 2003 test, i'll take a look at
your db if you want me to. i can send an email to you at the comcast
address
below, and you can email a copy of your db to me.

hth


Alex Martinez said:
Hi Tina,

Thanks for responding. I am using Access 2002. When I open the form up
I
don't see the time at all. The funny thing is I only will see the time
if I
click the time text box. That I don't want I want the time to always appear.
Clicking anywhere in the form besides the time text box will not show the
time at all. I went over your instruction. Something is missing and I
don't know what it is. I am going to try this in Access 2003. Again thanks
for your help. Any tips or suggestions will be appreciated. Thanks.




when you say "click on it", do you mean you're clicking on the "Time"
textbox control? or just clicking anywhere on the form?

i tested the setup first, on an A2000 database running in Access
2003,
and
then gave you the step-by-step instructions of how i set it up, so it
*should* work. did you follow all the instructions? and what version of
Access is your db?



Thanks Tina for all your help.

It seems the time won't show up on my form until I click on it and the
background color changes to white. Although I have a gray background.
I
did the date which shows all the time without a problem, but the
time
is
another matter. If anybody ran into this problem, please let me know.
Thank you in advance.



ok, do the following:

in the textbox: remove the DefaultValue setting. change the
ControlSource
to =Time()
this function displays the current time, automatically formatted as
hh:nn:ss
AM/PM. so you don't need to set the textbox's Format property unless
you
want a different display.

in the form: set the TimerInterval property to 1000. in the OnTimer
event,
double click. the words [Event Procedure] will appear and also a small
button on the right side (...). click the button. the VBA Editor window
will
open, with your cursor *already in the correct spot*. paste in the
following
code, as

Me!Text1.Requery

replace "Text1" with the correct name of your textbox. save and
close
the
window. now when you open your form in form view, the textbox will show
the
current time, counting off each second just like a digital-display
clock.

hth



Sorry I meant just to show the current time only. Thanks again.

are you wanting to date/time stamp each new record as it is entered
in
the
form? or are you wanting to show the current time on the form, like
a
clock
ticking away the seconds?

very different solutions for those two scenarios. please indicate
which
one
fits your situation, or describe your goal in more detail - so we
can
tailor
our suggestions to fit it.

hth



Hello,

I am using Access 2002 and I am using a text box to get the
time.
In
the
Data tab in properites I put Now() in the Default Value and in
format
I
am
using Long Time. My problem is that I do not see the seconds
change.
The
time changing only when I close and open the form. Can somebody
help
me.
All I want is to see in my form the time for example 10:00:34
AM.
Any
tips
or help will be apprieciated. Thank you.
 
Back
Top