Problem using Date() for default value in my Date/Time field

  • Thread starter Thread starter Marshall
  • Start date Start date
M

Marshall

I just installed Access 2007 on my computer today. I created my database
using a previous version of Access.

For some reason Access 2007 does not like =date() as the default value in my
Date/Time field. When I first opened my input form to add a new record,
today's date did not show up. I went back to the table design and =date()
was the default value, When I tried to save the table design, I got an error
message "Unknown valadation expression..." The help instructions for Access
2007 clearly indicate to use =date() if you want today's date to default.

I did not have this problem using the previous version of Access
 
Suggestions:

1. See if you have a problem with library references:
http://allenbrowne.com/ser-38.html

2. Double-check you have the =Date() in the Default Value, not in something
like the Validation Rule.

3. Since it complains about a validation expression, temporarily clear any
other properties that could affect this, such as the Validation Rule or
Input Mask. Check these properties for both the text box on your form and
also for the field in your table.
 
For some reason Access 2007 does not like =date() as the default value in my
Date/Time field.

This appears to be the very common References bug. Open any
module in design view, or open the VBA editor by typing
Ctrl-G. Select Tools... References from the menu. One of the
..DLL files required by Access will probably be marked
MISSING. Uncheck it, recheck it, close and open Access.

If none are MISSING, check any reference; close and open
Access; then uncheck it again. This will force Access to
relink the libraries.
 
On Fri, 16 Oct 2009 17:31:01 -0700, Marshall

Maybe you have a syntax error in your application (code window > debug
compile), or a missing reference (code window > tools > references).

-Tom.
Microsoft Access MVP
 
The fact that it says 'validation expression' indicates you are not setting a
default but a validation setting. Check where you are setting this is the
correct place.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
Back
Top