Date() error

M

Mark

Hi all,

I am using Access 2000. In a database I have set up I
have tried using the "Date()" function in queries to pull
records that are greater or equal to today's date. But
have gotten debugging errors when I run the database on
other network pc's. So, I had replaced the "Date()"
function with "Now()". But as you know and I quickly
found out that this is not a good solution (totally two
different functions).

Why would I be getting this error? And is there a patch
or something I can find to fix my problem?

Thanks a bunch for any assistance!!! Mark
 
D

Douglas J. Steele

Sounds like you probably have a References problem.

These are caused by differences in either the location or file version of
certain files between the machine where the application was developed, and
where it's being run (or the file missing completely from the target
machine). Such differences are common when new software is installed.

On the machine(s) where it's not working, open any code module (or open the
Debug Window, using Ctrl-G, provided you haven't selected the "keep debug
window on top" option). Select Tools | References from the menu bar. Examine
all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)

For far more than you could ever want to know about this problem, check out
http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html
 
M

Mark

Also, when I just tried to run the query with the "Date()"
function I got the following message:

Undefined function 'Date' in expression.

Not sure what I need to do. Thanks for any help, Mark
 
J

Jeremy

I had a similar problem in Access 97. I found out that somewhere I had
declared a variable as Date. As soon as I changed all my code to now
log_date the problem went away. Don't know why it fixed it but it did. I
also found that on win98 machines the format for the date has to be similar
or else access pulls in the format the machine is set to. So if win98 is
set to a 2 year date it will pull in dates as 2/10/04 instead of 02/10/2004
in XP.
 

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