Whats wrong with Date() ?

rodvaN

Registered User.
Local time
Today, 15:22
Joined
May 20, 2009
Messages
92
Hello, I jsut finished a database for a project, it works at its best on my pc, but when I installed it on other pcs, the date on the reports using the command Date() which means today right now they wont show, they display a #NUMBER on the reports.
How can I fix that, cause it works alright with me, dont know why not on the other pcs?
Suggestions?
Solutions?
Thanks
 
have you got a field or a control called date - access will get confused if you have, which is why we try to avoid using reserved words.
 
No I dont..
I have a field named EntryDate and DateFinal
But non called Date.
What else it could be ?
 
Try importing everything into a brand new, blank shell. Sometimes it can have issues with corruption. Also, make sure to turn off Name Auto Correct.
 
It could also be a reference problem. There are sometimes funky things that happen when we call basic VBA functions without indicating the library that contains the function. I'm in the habit of referencing the function as VBA.Date(). I think this can happen if people install Access without certain components but I'm not quite sure how it happens. For common functions like Date() I create a wrapper function like this:

Code:
Function MyDate()
  MyDate = VBA.Date()
End Function

That way I can call it as much as I want and not worry about the reference. I can even call it from the criteria in a query (which you couldn't do using the first method I mentioned.

I can't promise that this is the problem but it's certainly worth a shot

SHADOW
 

Users who are viewing this thread

Back
Top Bottom