PC Review


Reply
Thread Tools Rate Thread

DatePart errors in Access 2000

 
 
Scott A
Guest
Posts: n/a
 
      17th Sep 2003
I've been working with some Access 2002 reference
materials, but am programming in 2000. There are a few
things I have tried that involve using date parts, and
every time I try them out I get an error. The latest one
says Compile Error: sub or function not defined.

I'm wondering whether there is support for date parts in
2000, or if I should be looking for something else.

Any ideas?
 
Reply With Quote
 
 
 
 
John Spencer (MVP)
Guest
Posts: n/a
 
      18th Sep 2003
To do its job, Access (like most modern programs) makes use of various
external program and object libraries that provide functionality that may be
shared among applications. For example, Access always uses the Visual Basic
for Applications library, the version-appropriate Access Object Library, and
the OLE Automation library. References to the specific library files,
including their locations, are stored with your database. But these library
modules may not be in the same location on different machines, especially if
they have different versions of Microsoft Office. If you move a database
from one machine to another, these references may be "broken"; that is, one
or more of the library files may not be where the stored reference says it
is.

When this happens, you need to take steps to let Access repair the broken
reference(s) ON THE COMPUTER WHERE THE FAILURE IS OCCURING.

Here are Doug Steele's instructions for how to do it:

****Quote****
Open any code module (or open the Immediate Window, using Ctrl-G, provided
you haven't selected the "keep debug window on top" option). 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).

Just so you know: the problem will occur even if the library that contains
the specific function that's failing doesn't have a problem.
****Unquote****

So, follow those instructions and see if your problem goes away.

Check out the following reference
http://www.trigeminal.com/usenet/usenet026.asp?1036

Scott A wrote:
>
> I've been working with some Access 2002 reference
> materials, but am programming in 2000. There are a few
> things I have tried that involve using date parts, and
> every time I try them out I get an error. The latest one
> says Compile Error: sub or function not defined.
>
> I'm wondering whether there is support for date parts in
> 2000, or if I should be looking for something else.
>
> Any ideas?

 
Reply With Quote
 
Van T. Dinh
Guest
Posts: n/a
 
      18th Sep 2003
DatePart has been around for a while and I used it in A97
IIRC.

Have you checked for Reference errors. See Douglas J.
Steele's Reference Errors:

<http://members.rogers.com/douglas.j....ccessReference
Errors.html>

HTH
Van T. Dinh
MVP (Access)




>-----Original Message-----
>I've been working with some Access 2002 reference
>materials, but am programming in 2000. There are a few
>things I have tried that involve using date parts, and
>every time I try them out I get an error. The latest one
>says Compile Error: sub or function not defined.
>
>I'm wondering whether there is support for date parts in
>2000, or if I should be looking for something else.
>
>Any ideas?
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using the DatePart function in an Access 2003 HAVING clause Tom B. Microsoft Access VBA Modules 9 24th Oct 2008 08:17 PM
Datepart and Dateadd errors Access 2007 Date Functions format errors Microsoft Access Queries 2 3rd Oct 2008 05:03 PM
Errors after Modifying Access 2000 db using Access 2003 kosakahonmachi Microsoft Access 2 11th Dec 2007 02:13 PM
My Access 2000 ADE Developed in 2000 OS was producing errors in C. =?Utf-8?B?R25hbmVuZHJh?= Microsoft Access VBA Modules 0 7th Oct 2004 04:13 PM
MS Access 2000 errors Steve Microsoft Access 0 23rd Mar 2004 08:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:51 AM.