Date() function

P

PLD

Access 2000 SP3

When I use the date() as a default in a date field for default I get an
error when I save the table. Unknown function'Date' in validation expression
or default value in <table name>. Any ideas???
 
D

Damian S

Hi PLD,

In the table default value, you need to use =Date() not Date() for the
default value

Damian.
 
A

Arvin Meyer [MVP]

PLD said:
Access 2000 SP3

When I use the date() as a default in a date field for default I get an
error when I save the table. Unknown function'Date' in validation
expression
or default value in <table name>. Any ideas???

You probably have a missing reference. Open any code window and choose:

Tools >>> References

Then look for any references marked as "MISSING" Click the browse button to
find the correct one, and the try compiling your code. If the code compiles
your errors will stop.
 
M

Marshall Barton

PLD said:
Access 2000 SP3

When I use the date() as a default in a date field for default I get an
error when I save the table. Unknown function'Date' in validation expression
or default value in <table name>.


Whenever you use a function anywhere except in a VBA
procedure, you must include the parenthesis e.g. Date()
 
P

PLD

YES! that is the problem. DTCINT 1.0 Type Library is missing. I got this
project from another person and I search my system and I do not have this. Is
there a place I can get it?
 
D

Douglas J. Steele

Do you really need it? Try removing the reference (i.e. unchecking it), then
compiling your application (on the Debug menu when you're in the VB Editor).
If it compiles cleanly, you likely didn't need the reference in the first
place.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)
 
A

Arvin Meyer [MVP]

I'm not sure if you saw the other answers, so let me give you mine. If that
type library is required to run this application, you'll probably need to
get it from whomever gave you the application. If not just uncheck the
missing reference, and choose Debug >>> Compile All Modules from the menu.
You can easily find out by making a copy of your database and uncecking the
reference, then recompiling. If it squalks, you'll need the reference.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top