DateDiff and Access VersionDB

  • Thread starter Thread starter dwight cornett
  • Start date Start date
D

dwight cornett

I have the following date code in my db query.

Age:DateDiff("d",[PwdIsDate],date())

I am trying to see the number of days from the PwdIsDate
to the current date.

In Access 97 and Access 2000 this function seems to work
fine. I just received a new db from another area and
although it seems to work ok in all other aspects this
function tells me it has a compile error. Using the help
screen I saw a "y" in place of the "d" however that did
not work for me either. The query works fine without this
function however I really need it.

Any assistance would be TRUELY APPRECIATED.....

Thanks in advance...

Dwight
 
I have the following date code in my db query.

Age:DateDiff("d",[PwdIsDate],date())

I am trying to see the number of days from the PwdIsDate
to the current date.

In Access 97 and Access 2000 this function seems to work
fine. I just received a new db from another area and
although it seems to work ok in all other aspects this
function tells me it has a compile error. Using the help
screen I saw a "y" in place of the "d" however that did
not work for me either. The query works fine without this
function however I really need it.

Any assistance would be TRUELY APPRECIATED.....

Thanks in advance...

Dwight

Probably a missing reference.

Open any module in Design view (or click Ctrl + G).
On the Tools menu, click References.
Click to clear the check box for the type library or object library
marked as "Missing:."

An alternative to removing the reference is to restore the referenced
file to the path specified in the References dialog box. If the
referenced file is in a new location, clear the "Missing:" reference
and create a new reference to the file in its new folder.

See Microsoft KnowledgeBase articles:
283115 'ACC2002: References That You Must Set When You Work with
Microsoft Access'
Or for Access 97:
175484 'References to Set When Working With Microsoft Access' for
the correct ones needed,
and
160870 'VBA Functions Break in Database with Missing References' for
how to reset a missing one.

For even more information, see
http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html
 
Back
Top