date()

A

Andy

Hi
I have created an Access 2000 database which runs fine on my machine(XP
SP2), but has problems on my clients 3 networked PCs (XP SP2).

The problem seems to centre around the date() function. As a test I
created a new blank database on his machine, and if, for example, I
create a simple table with an autonumber field and a date field with
default value of date(), I cant add records to the table (the add
asterisk is greyed out).
Is this possibly some sort of VBA library error??

Andrew Millar
 
J

Jeff Conrad

in message:
Hi
I have created an Access 2000 database which runs fine on my machine(XP
SP2), but has problems on my clients 3 networked PCs (XP SP2).

The problem seems to centre around the date() function. As a test I
created a new blank database on his machine, and if, for example, I
create a simple table with an autonumber field and a date field with
default value of date(), I cant add records to the table (the add
asterisk is greyed out).
Is this possibly some sort of VBA library error??

It is a References problem. The arch-nemesis of Access is missing references.

To fix the References problem follow these steps (on the computer with the problem):
- Open any module in Design view.
- On the Tools menu, click References.
- At least one Reference should say "Missing". WRITE down the one(s) missing.
- Click to clear the check box for the type library or object library marked as "Missing:."
- Close the References Window box.
- Open the References Window back up. Hopefully, nothing should say Missing this time.
- Now go find that library/project(s) in the list that was missing.
- If more than one were missing, find the others and check them as well.
- Close the References box again.
- Now re-compile again. Debug--Compile.
- Hopefully you should not see any more compile errors.

If you'd like to read more about References, here's more info than you could possibly ever want to
know:

http://www.accessmvp.com/djsteele/AccessReferenceErrors.html

http://allenbrowne.com.au/ser-38.html

http://www.trigeminal.com/usenet/usenet026.asp

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

http://www.access.qbuilt.com/html/gem_tips1.html#DAOLibRef

References that you must set when you use Microsoft Office Access 2003:
http://support.microsoft.com/?id=825796

ACC2002: References That You Must Set When You Work with Microsoft Access:
http://support.microsoft.com/?id=283115

ACC2000: How Access 2000 Resolves Visual Basic for Applications References
http://support.microsoft.com/?id=248941

ACC2000: How to Resolve Reference Issues in an Access Database
http://support.microsoft.com/?id=310803

List of the references that you must set when you work with Access 2000 or Access 97 database:
http://support.microsoft.com/?id=197110

ACC97: References That You Must Set When You Work with Microsoft Access
http://support.microsoft.com/?id=175484

ACC: VBA Functions Break in Database with Missing References
http://support.microsoft.com/?id=160870
 
W

WebDude

Amazing, i had the same problem using DATE() & Format() functions on a
computer i copied my database to. So, as you suggested, i went into the
Tools>References Menu only to find that indeed one file was marked as
MISSING. So, i unchecked the MISSING file then went to debug>compile and now
the DATE() & format() functions work again!

Thanks guys!
WebDude


ps: the MISSING file was called fptdc.dll 1.0 type library however, After i
unchecked it in the references window then closed the references window,
recompiled the database then re-opened the references window.. ** the
fptdc.dll was gone **... and i mean, i looked down the entire list of
references and it was no where. Any ideas what happaned? If i never had it,
then why would it have interferred with anything?
 
D

Douglas J Steele

References are like apples: one bad one can spoil the whole bunch...

Likely the file fptdc.dll existed on the machine where the database was
developed, and, for some reason, the original developer did something that
caused it to be added to the references. (Perhaps he/she was experimenting
with something, and forgot to remove the reference when they removed the
code that they decided not to use). References live in the database, which
would explain why you saw it even though it's not on your machine.

Note that the same problem could have occurred even if you DID have
fptdc.dll on your machine, but your version was different than that on the
developement machine.
 
Top