PC Review


Reply
Thread Tools Rate Thread

DIR function in Access 2000

 
 
=?Utf-8?B?cmlkZGVycw==?=
Guest
Posts: n/a
 
      24th Aug 2006
I have a database created in access 2003 (using the default Access 2000
format).
This has an autoexec macro including a query which uses a DIR function to
test if a number of files exist. It works fine.

The query is:
UPDATE DefaultImage, PupilData INNER JOIN ImagePath ON PupilData.PupilID =
ImagePath.PupilID SET ImagePath.ImageCheck = IIf(PupilData![Photo
Available]=Yes Or Dir(ImagePath!PhotoPath)<>"",Yes,No), ImagePath.ImagePath =
IIf(ImagePath!ImageCheck=Yes,ImagePath!PhotoPath,DefaultImage!DefaultImage);

However when I tried to run the database in Access 2000 it won't run.
Error message is User-defined type not defined.
The error disappears if I amend the query to delete DIR but I need the
functionality.

Is DIR available in Access 2000? If so, do I need to tick any references in
VBA editor e.g. DAO? If not, any suggestions how to rewrite this query?

Thanks in advance for any help
 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a
 
      24th Aug 2006
Dir should work in A2000.

It would be worth checking your references are okay.
Press Ctrl+G to open the Immediate window.
Choose References on the Tools menu.
Look for any marked "MISSING".
More info on what references you need in each version of Access:
http://allenbrowne.com/ser-38.html

Another possibility is that you are in sandbox mode:
http://support.microsoft.com/kb/239482/en-us

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"ridders" <(E-Mail Removed)> wrote in message
news:2A828AA4-8CD2-4E3D-BEF3-(E-Mail Removed)...
>I have a database created in access 2003 (using the default Access 2000
> format).
> This has an autoexec macro including a query which uses a DIR function to
> test if a number of files exist. It works fine.
>
> The query is:
> UPDATE DefaultImage, PupilData INNER JOIN ImagePath ON PupilData.PupilID =
> ImagePath.PupilID SET ImagePath.ImageCheck = IIf(PupilData![Photo
> Available]=Yes Or Dir(ImagePath!PhotoPath)<>"",Yes,No),
> ImagePath.ImagePath =
> IIf(ImagePath!ImageCheck=Yes,ImagePath!PhotoPath,DefaultImage!DefaultImage);
>
> However when I tried to run the database in Access 2000 it won't run.
> Error message is User-defined type not defined.
> The error disappears if I amend the query to delete DIR but I need the
> functionality.
>
> Is DIR available in Access 2000? If so, do I need to tick any references
> in
> VBA editor e.g. DAO? If not, any suggestions how to rewrite this query?
>
> Thanks in advance for any help



 
Reply With Quote
 
=?Utf-8?B?cmlkZGVycw==?=
Guest
Posts: n/a
 
      24th Aug 2006
Thanks - fixed it as suggested


"Allen Browne" wrote:

> Dir should work in A2000.
>
> It would be worth checking your references are okay.
> Press Ctrl+G to open the Immediate window.
> Choose References on the Tools menu.
> Look for any marked "MISSING".
> More info on what references you need in each version of Access:
> http://allenbrowne.com/ser-38.html
>
> Another possibility is that you are in sandbox mode:
> http://support.microsoft.com/kb/239482/en-us
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "ridders" <(E-Mail Removed)> wrote in message
> news:2A828AA4-8CD2-4E3D-BEF3-(E-Mail Removed)...
> >I have a database created in access 2003 (using the default Access 2000
> > format).
> > This has an autoexec macro including a query which uses a DIR function to
> > test if a number of files exist. It works fine.
> >
> > The query is:
> > UPDATE DefaultImage, PupilData INNER JOIN ImagePath ON PupilData.PupilID =
> > ImagePath.PupilID SET ImagePath.ImageCheck = IIf(PupilData![Photo
> > Available]=Yes Or Dir(ImagePath!PhotoPath)<>"",Yes,No),
> > ImagePath.ImagePath =
> > IIf(ImagePath!ImageCheck=Yes,ImagePath!PhotoPath,DefaultImage!DefaultImage);
> >
> > However when I tried to run the database in Access 2000 it won't run.
> > Error message is User-defined type not defined.
> > The error disappears if I amend the query to delete DIR but I need the
> > functionality.
> >
> > Is DIR available in Access 2000? If so, do I need to tick any references
> > in
> > VBA editor e.g. DAO? If not, any suggestions how to rewrite this query?
> >
> > Thanks in advance for any help

>
>
>

 
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
Use of Nz Function in Access 2000 =?Utf-8?B?R3VheW8=?= Microsoft Access Queries 2 31st Jul 2005 01:10 PM
Re: Does MS Access 2000 have encryption function? Brendan Reynolds Microsoft Access VBA Modules 0 13th Apr 2005 10:29 AM
Using the IsLoaded() function in Access 2000 causes error, but not in Access 2002 Dave Microsoft Access Form Coding 3 29th Oct 2004 05:26 PM
Date function error Access 2002 - Access 2000 Harold Microsoft Access VBA Modules 3 2nd Sep 2004 08:21 PM
Function ??? (Access 2000) jbc Microsoft Access VBA Modules 2 25th May 2004 05:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:13 PM.