confirming a file based on only part of the name then printing it

T

tekkie

What I am trying to do is print a file. In the application I need to confirm
the existance of a file give only part of the file name. Then I need to print
the file. This is from within MS Access.

Thanks in advace.
 
M

Marshall Barton

tekkie said:
What I am trying to do is print a file. In the application I need to confirm
the existance of a file give only part of the file name. Then I need to print
the file. This is from within MS Access.


Use the Dir function to get the full name of the file(s)
that match your partial name (no idea what you might want to
do if there's more than one).

If Dir("path\xxx*") = "" Then
'No matching file in path
Else
'at least one file found
End If
 

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