Date() Now() Time()

  • Thread starter Thread starter ano
  • Start date Start date
A

ano

Hey,

I've used Date() and Time() in my database the whole time,
but it doesn't work now.... I used Now() instead, which
work... but then I inlcude the whole date and time I want
them seperate... Does anyone have an idea why it suddenly
stopped working?
 
Check your references. Often problems like this are cause by one that is
marked as MISSING. Open your VB Editor, click Tools - References and look
for any marked MISSING. If you find any, uncheck them, close the Reference
dialog, then re-open it, find that reference and recheck it.
 
Hey,

I've used Date() and Time() in my database the whole time,
but it doesn't work now.... I used Now() instead, which
work... but then I inlcude the whole date and time I want
them seperate... Does anyone have an idea why it suddenly
stopped working?\

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.
 
The others have told you how to get Date() and Time() working properly. I
just thought I'd add that you _should_ be storing the date and time
together, not as separate fields. It makes your queries much easier.

If you do need just one or the other, use the DateValue() and TimeValue()
functions to retrieve that portion you want from the timestamp.
 
Back
Top