View Full Version : Default Value Problem


thinair421
07-12-2010, 04:49 AM
Hey guys,

I currently have the default value for one of my fields set to =Date(). I wanted to know if there is a way to add a space after the date, so in the text box linked to this field the user only has to press [CTRL]+[SHIFT]+ ; to add in a timestamp (not [SPACE] then [CTRL]+[SHIFT]+ ; ). I know about the =Now() function, however I would like the user to add in the timestamp manually, due to the fact that the text box is in a subform on a main form containing many tabs. Using =Now() puts the time from when the tab that the subform is on is selected...and considering the user could click on the tab on accident, I don't want the time to be inaccurate. Thanks a bunch in advance.

JamesMcS
07-12-2010, 04:56 AM
Try using =date() & " "

thinair421
07-12-2010, 05:02 AM
Thanks for the quick reply. Unfortunately it didn't work. Would I add it to the default value property or code in VBA?

Also, it appears as if =date() almost overrides everything else. Entire date is highlighted when I get focus on the subform. Any other suggestions? Thanks again.

JamesMcS
07-12-2010, 05:03 AM
In the default value property of the field in table design. It won't work if the field is formatted as a date/time, it'll have to be a Text field.

thinair421
07-12-2010, 05:05 AM
Ah alright, excellent. Thank you very much.

thinair421
07-12-2010, 05:06 AM
Hmm actually it still didn't work...even formatted as text.

thinair421
07-12-2010, 05:08 AM
Nevermind i'm an idiot. Worked perfect, I just forgot to delete the old record I was on. Thanks so much for the quick help James.