How to check for the existence of a file in an access macro?

R

Rli

i want to find out how i can stop an access-macro if a certain file does not
exist on my computer...
can anyone help me ?
 
N

Nikos Yannacopoulos

What you need is a condition like:

Dir("C:\SomeFolder\SomeFile.ext")=""

on a StopMacro action.

The Dir looks for the file and returns its name if found, or "" if not,
in which case the StopMacro will execute.

HTH,
Nikos
 
R

Rli

thanks, Nikos....its the right awnser...

Nikos Yannacopoulos said:
What you need is a condition like:

Dir("C:\SomeFolder\SomeFile.ext")=""

on a StopMacro action.

The Dir looks for the file and returns its name if found, or "" if not,
in which case the StopMacro will execute.

HTH,
Nikos
 

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