Wildcard in file path name?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an Access report which displays a picture of the corresponding data by
referencing the file path in the table. The problem I have is the file names
of the phots are not consistant. For example the path might be
c:\pictures\R311.jpeg and another might be c:\pictures\R314front.jpeg. What
I'd like to do is put a wildcard in the path after the fourth character so it
will find all of the pictures. Would this be code or something I can do to
the access table?

I'm fairly new to VB code but have found a lot of useful information in this
newsgroup to get me by except for this problem.
 
Skip,

What are you trying to display in your report? Is it one
picture per record or are you trying to display as many
pictures as you can find - eg r314front.jpeg,
r314back.jpeg, r314inside.jpeg, etc ...? - I hope it is
only 1 picture.

The "dir" function will return the path and name of a file
matching wildcard parameters. See VBA help for a complete
rundown on usage.

Terry
-----Original Message-----
I have an Access report which displays a picture of the corresponding data by
referencing the file path in the table. The problem I have is the file names
of the phots are not consistant. For example the path might be
c:\pictures\R311.jpeg and another might be
c:\pictures\R314front.jpeg. What
 
Thanks Terry!

The Dir command worked great and yes I was just wanting to grab the first
photo that met the account criteria.
 
Back
Top