Dir function and Vista

J

John J.

My costumer recently moved to Vista. Now the following code sometimes
doesn't work.

If Len(Dir(varMyPath & "mut.txt")) = 0 Then

Sometimes, even while the file is there, the outcome is 0. I can't figure
out what it is. Could this have something to do with Vista?

Thanks,
John
 
D

Dirk Goldgar

John J. said:
My costumer recently moved to Vista. Now the following code sometimes
doesn't work.

If Len(Dir(varMyPath & "mut.txt")) = 0 Then

Sometimes, even while the file is there, the outcome is 0. I can't figure
out what it is. Could this have something to do with Vista?


I don't think so; I use code like that in my databases and don't have any
problem. But what is in varMyPath? If, for example, it is a path string
that was hard-coded, and it refers to the user's personal document folder,
the path to that folder is different in Vista than it was in XP.
 
J

John J.

Thanks Dirk. varMyPath is obtained from a control table.
I'll do some further checking.
John
 

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