Tuesday, June 1, 2010

Access: Automatically enter today's date in a field

For some records, you enter today's date for a particular field. When a date is to be the current date, you can eliminate entering any value at all. Set the field’s Default Value property to Now() or Date(). When you enter a new record, the property will enter the system’s current date (and time). If for some reason it is not today's date, you can still type over the default value with the correct date (and time).If you only occassionaly enter the current date, you can use the shortcut CTRL+; (semicolon) instead.

Now() versus Date()

The Now() function returns the system’s current date and time. It’s a package deal–you always get both. If all you need is the current date and not the time, use the Date() function instead. On the other hand, if all you want is the current time, use the Time() function. Don’t use Now() unless you really mean to store both the date and time.

No comments:

Post a Comment