Date() function is not working on User's machines

F

FA

Hi Freinds,
I have a problem with my Date Function which i am not been able to
resolve and hoping i can get some help from the experts. I am using the
date function in my queries such as
Between Date()-7 And Date() and its working fine on my machine. I
created the mde file and put it on the shared drive and all the users
copied that file from the shared drive to their local machines. On
every user's machine, the date() funciton is not working giving me the
error that date function is not available. Its working fine on my
machine but wheni tested on other user's machine its not working.
Whereever i am using Date() , its not working on Users machine.

Please help me out

Thanks
Moe
 
D

Douglas J Steele

Likely a problem with the References collection.

All Access databases contain references to external files that they use. If
the same versions of the files don't exist in the same locations on the two
machines, you can run into the problem you're encountering. The specific
function(s) causing problems isn't indicative of which reference is the
culprit, either. References are like apples: one bad one can spoil the whole
bunch.

On the machine(s) where it isn't working, open any code module, then 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)
 
G

Guest

Try to change Date()-7 by DateAdd("d"; -7; Date()).
But.... Date() - N should be work !
--
IMPORTANT: Do not forget to rate my answer. Click YES if my post was helpful
for you or NO if was not. /
*Não esqueça de classificar minha resposta. Clique SIM ou NÃO.

Grande Abraço,
Rubens Cury
 
G

Guest

It is very possible there is a missing reference. In the VBA Editor, go to
Tools, References and look for any references marked Missing.
 

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