Time() Not working??

CharlesWhiteman

Registered User.
Local time
Today, 23:16
Joined
Feb 26, 2007
Messages
421
In my Db in various forms i use code such as me.txtbox=Time() and it works fine except on one form where it doesnt give a value.

Are there any circumstances that would make this a predictable outcome?:mad:
 
Not sure if this will give you more consistency, but I always make sure I use the syntax as vba.time() instead of just time().
 
There must be something wrong on the form itself or that textbox

Does it work on another textbox within that form? Try displaying time() in a messagebox on a button click for testing purposes



PS: 4th project? Yes, still a noobie haha
 
I would personally use

TimeValue(Now)

instead.
 
Hey all thanks so much for taking the trouble to reply.

1) 3ammaksammer - I tried that, not that much of a newbie!!

2) Bob, I will test that out.

3) Gemma - you are a STAR!!! Yes, the issue was having another txx box called time. Changed it to txtTime (I usually put txt infront but on this occassion to be more rapid did not) and it worked fine.
 
Whether you use Bob's TimeValue(Now) or the normal Time.
Always put a vba. before it, it is just a good habit and tell Access where to go look for the value.
Putting a vba before it will force it to go look for time (clock) inspite you having another field called time.
 
Thanks Freshman, I will build that in to my Db during the course of its maintenance. I'd not heard it before so will have to gen up on it.
 

Users who are viewing this thread

Back
Top Bottom