469,640 Members | 1,561 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,640 developers. It's quick & easy.

Adding current time in field with toggle button

I am trying to add the current time to a field when the user clicks on
the toggle button next to the field. I am getting a time of 12:00:00
AM each time I click the button.

How do I get a return of the current time?

MarthaR
Nov 12 '05 #1
2 10152
If by "add the current time", you mean insert the current time, then
Try:
Sub ToggleBtn_Click
me!TimeField=format(now(),"short time") ' or any other time format
end sub

HTH,
John

"MarthaR" <ki***********@hotmail.com> wrote in message
news:6b**************************@posting.google.c om...
I am trying to add the current time to a field when the user clicks on
the toggle button next to the field. I am getting a time of 12:00:00
AM each time I click the button.

How do I get a return of the current time?

MarthaR

Nov 12 '05 #2
ki***********@hotmail.com (MarthaR) wrote in
news:6b**************************@posting.google.c om:
I am trying to add the current time to a field when the user clicks on
the toggle button next to the field. I am getting a time of 12:00:00
AM each time I click the button.

How do I get a return of the current time?

MarthaR


Look at your watch. :)

Seriously, you need to post the code that's fired in the OnClick event of
your button. I suspect that you are using date(). use time() instead, or
use now() which ill return both, and format the textbox (you called it a
field, but it's a textbox) to show the hours only.

Bob Q
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

32 posts views Thread by Ed Jay | last post: by
1 post views Thread by Jackson M via AccessMonster.com | last post: by
3 posts views Thread by Jim Heavey | last post: by
1 post views Thread by swethak | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.