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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date() and Date$() - unknown function??

Status
Not open for further replies.

jasek78

Programmer
Nov 5, 2001
298
US
I'm trying to set a default value of the current date in date/time field on a table.

I entered "=Date()" in the Default Value field (w/o the quotes) and when that didn't work, I tried "=Date$()"

I got the same error message both times when I tried to save and preview the table - "Unknown Function 'Date' in validation expression or default value on tablename.fieldname

Also, can someone tell me what the difference between the two date functions is? Do they use different calendars? ( I looked them up under the Access help, but it wasn't a very clear explanation...

thanks for your help...

jason
 
Date() will return a variable of type Date/Time
Date$() will return a variable of type String

(I think)...

About the error message... you might want to check your references to make sure they are all there... I've had the same problem with 'left' and 'right' before, but it was just that a reference went missing... after I removed that reference, it worked just fine.

GComyn
 
With =Now()

I get an error: "The expression you entered has a function name that Microsoft Access can't find"

With Now()

I get an error: "Unknown function name is table-level validation expression"
 
GComyn -

Where do I check the references in Access?

jason

(btw, everyone, I'm using Access2000)
 
Sounds like you have a missing reference. Go to Tools => Reference and see if you have the VBA, DAO and access Library references loaded. My guess is you will find you are missing a reference library and need to install this.
 
I don't have a "Tools => Reference" menu item...
 
I am using access 97 but you can try to mimic it. Go to a module, open it up in design view and then go to tools => reference .
 
You have to open a module to see that menu item... just open any module (form or report code will work as well), and then go to tools=>references... and check there..


GComyn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top