= now () problems

loveforfire33

New member
Local time
Yesterday, 18:11
Joined
Mar 19, 2009
Messages
6
hi,

im using the expression = now () to input a date on a form, that is saved to table. allthough when i click the save button and check the table the date hasnt saved.

the unusual thing is when i manually input the date using the date picker the record saves when i click the save button

any ideas would help guys

thanks
 
Where have you put it, I usually put mine in the default value of the control on the form using =Format(Now(),"dd,mm,yyyy") or "mm,dd,yyyy" in the US.

regards John

EDIT:

= now () Usually returns 01/01/2009 15:42 etc.... eg. Time and date which may not be what your table value is formated to just a thought.
 
i have put in the control source field for actual field, i have two dates that need to be entered on the form (issue date, reutrn date) so im not sure if making it default for the form would work :(
 
Usually works ok for me on the forms control value as the form is passing/updating the field data in the table (same as when you enter information manually) your other date field will not be effected unless you do the same for that control/fields property settings on the form.
 
Putting something in the control source of a control will not save it to the table. Putting it in the DEFAULT will (as long as the control source is bound to a field in the table). And I would not use NOW unless you need the time. I would use =Date() instead.
 
have you tried Format(Date, "mmddyy") ?

tuxalot,

Format() returns a text string and not a date (data type). If you field is set to the type date/time, then you should not use the format(). Unless you are saving the date as text, not a date data type, then you would use the Format().

If the field is a type date/time, and you use Format(Date, "mmddyy") then Access takes the date data type returned by the Date() and converts is to a string with the Format function. Then to save it into a date field, it must convert it back to the original value before the Format() was used. Why do all the type conversions when none are needed?
 

Users who are viewing this thread

Back
Top Bottom