Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datebase

Status
Not open for further replies.

serina

Programmer
Mar 30, 2001
5
HK
I have one question about datebase and I dont know how to use Now() in microsoft access.

Thank you for your help
 
Hi Serina,
Now() means this instant...Day,Month,Year,Hour,Minute,Second.
Perhaps you want to use this as the "Default Value" for a date field in a table or on a form. In a table, find that field's "Default Value" property, and type in:

=Now()

Save and open the table in datasheet view. The bottom record waiting to be filled in with other data should already have a date~time in it and it should be now!

On a form it's the same deal. With the form in design view, double-click on your date/time field and its properties dialog box will pop up. Find the "Data" tab and again the "Default Value" property. Type in:

=Now()

If you built the form after the table was all set up (with Now as a default value) this field on your form would automatically inherit this value. That's the importance of getting tables all sorted out first, then build the forms.

Hit F1 at anytime to show Access Help as I'm sure there are lots of nifty examples of Now() or optionally "Date". Oh as a P.S., try to avoid using "Date" as a field name. Access gets upset with it. (Fussy thing.) Better to name a date field like "StartDate" or "EndDate". Hope this helps you, Gord
ghubbell@total.net
 
Thank you very much
I think I know how to use it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top