Date() stoped working

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

Hi anyone,

I kinda confused...My date() function stoped working (I
use a great deal of it).. And it says that it is
unrecognizable function (Access 2k)..I checked the
spelling, checked the fields..It does not work neither in
VB nor when in a form I set to use it as a default value..

Should I reinstall Access..or just to add some library
that by some strange circumstances got lost..?

Thanks for your time and help.
 
Alex said:
Hi anyone,

I kinda confused...My date() function stoped working (I
use a great deal of it).. And it says that it is
unrecognizable function (Access 2k)..I checked the
spelling, checked the fields..It does not work neither in
VB nor when in a form I set to use it as a default value..

Should I reinstall Access..or just to add some library
that by some strange circumstances got lost..?

Thanks for your time and help.

Do you have access (no pun intended) to a second installation of Access? If
so, put a copy of your application where it depends on that second instance
and see if the behavior persists. If the Date() function works on the second
PC, reinstall Access 2000.
 
Another approach, and one that wouldn't require a full reinstall of Access,
would be to check the References in a code module. Access can sometimes
lose a pointer to some of the components it needs, and a non-functional
Date() function seems to be one of the symptoms.

Click on Tools|References in a code module and see if any of the checked
references are prefixed with "MISSING". Uncheck it, noting which one.
Save, re-open Tools|References and re-check that reference. Save, compile,
save/close the code module. Does Date() work now?
 
Likely, re-installing ms-access will not fix this problem at all.

Broken refs are NOT fixed by re-installing ms-access.

We get a LOT these questions here...

Likely what happened is that have some references not working.

Try whacking ctrl-g, and then go tools->references to seen if any are marked
as missing.

In fact, you want to remove AS MANY as possible refs. A min refer set for
a2000 is:

Visual Basic for Applications
Microsoft Access 9.0 library
Microsoft DAO 3.6 Object library
ActiveX Data Objects 2.1 Library

The above is all you really need. I would not add any more refs.

Also, note that if the machine you developed on has different refs then the
target pc, then again you can have problems. That means you want to ensure
you install the same service packs on the target pc also (same upgrades to
office, and same upgrades to JET).

Here is some more reading on refs:

Allen Browne
http://users.bigpond.net.au/abrowne1/ser-38.html

Doug Steele:
http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html

Peter Walker:
http://www.papwalker.com/dllhell/index-page2.html


MsKb Articles: 310803, 208218, 209849, 286300

ACC2000: How Access 2000 Resolves Visual Basic for Applications References
http://support.microsoft.com/default.aspx?scid=kb;en-us;248941

ACC2000: How to Resolve Reference Issues in an Access Database
http://support.microsoft.com/default.aspx?scid=kb;en-us;310803
 
Alex said:
Hi anyone,

I kinda confused...My date() function stoped working (I
use a great deal of it).. And it says that it is
unrecognizable function (Access 2k)..I checked the
spelling, checked the fields..It does not work neither in
VB nor when in a form I set to use it as a default value..

Should I reinstall Access..or just to add some library
that by some strange circumstances got lost..?

Thanks for your time and help.

Thanks, Jeff and Albert, for teaching me about a feature I didn't know
existed!
Alex, glad you got it sorted.
 
Albert, :)

Thanks..this is what I call "human.lazy=no" attribute.
Very professional and comprehensive answer. Thanks again.
 
Back
Top