Cable Forum

Cable Forum (https://www.cableforum.uk/board/index.php)
-   General IT Discussion (https://www.cableforum.uk/board/forumdisplay.php?f=19)
-   -   Quick access question (https://www.cableforum.uk/board/showthread.php?t=33609236)

OinkyBoinky 28-02-2007 12:00

Quick access question
 
https://www.cableforum.co.uk/images/local/2007/02/2.jpg

Wot can i put into that Default Value bit so that it shows the current date of when the page was opened? its beenn a few years since my GCSE when i last had to deal with this.

spiritusmundi 28-02-2007 12:12

Re: Quick access question
 
Try this:

When a date is usually the current date, you can eliminate entering any value at all. Simply 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). You don't even need to press [Ctrl] ;.

#3: 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.

Why does it matter? A value that includes both a date and time component usually responds differently to expressions. For instance, you might expect the following expression to find dates that fall after December 12, 2006:

WHERE field >#12/12/2006#However, the resulting recordset will include December 12, 2006, entries when the entry includes a time value. Conversely, Access won't return December 12, 2006, dates if the entry stores just a date value.

OinkyBoinky 28-02-2007 12:21

Re: Quick access question
 
thank you :) i kenw it was sumthin simple

OinkyBoinky 28-02-2007 16:48

Re: Quick access question
 
I've got another one, i've got a field called Birthdate that has a dob, and i've just created a new field called age.

Is there a way i can use date() and the [birthdate] field and put those into the age field's Default Value? to save having to manually enter the age?


All times are GMT. The time now is 05:42.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum