Folder Object and Access 2007

  • Thread starter CSIMechanicsville via AccessMonster.com
  • Start date
C

CSIMechanicsville via AccessMonster.com

I was wondering if anyone else has had any problems in using the Folder /
FileSystemObject objects in VBA in Access 2007? I have a line of code that
has worked without complaint in A2000 & A2003, but when A2007 executes it, it
gives a '13 - Type Mismatch' error.

The line of code that is causing trouble in A2007 is:
Set fo = f.GetFolder("C:\MyStuff") [Where fo is a Folder object & f is a
FileSystemObject].

Any input is appreciated.

Thank you.
 
R

RoyVidar

CSIMechanicsville said:
I was wondering if anyone else has had any problems in using the Folder /
FileSystemObject objects in VBA in Access 2007? I have a line of code that
has worked without complaint in A2000 & A2003, but when A2007 executes it, it
gives a '13 - Type Mismatch' error.

The line of code that is causing trouble in A2007 is:
Set fo = f.GetFolder("C:\MyStuff") [Where fo is a Folder object & f is a
FileSystemObject].

Any input is appreciated.

Thank you.

Try dismabiguating, i e in stead of

dim fo as folder

use

dim fo as scripting.folder
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top