Open Folder button coding

M

Midget

Hey Gang,
I currently use the following code to open up folders based on
specific records in my table:

Private Sub OpenFolder_Click()
Dim FolderName As String
FolderName = Me![PR#] & ", " & Me![Serial] & ", " & Me![Name]
Dim ProjectPath
ProjectPath = "\\Server\Share\" & FolderName
Shell "c:\WINDOWS\explorer.exe """ & ProjectPath & "", vbNormalFocus
End Sub

My question is this:
Is there any way to get this to search for a folder based on the
"Serial" data only, using a wildcard at the beginning and the end of
the field? Our folder naming convention has only just recently
changed to what you see above, and the conventions were all over the
place for several years before, but the only constant that will be
unique, and correctly typed is the Serial field. This is why I want
to be able to click on the button from whatever record I am looking
at, have it drill through the folder looking for *15-3Z* (or something
along those lines), and pull up the appropriate record.
Does anyone know how this can be accomplished?
TIA
Ryan
 
M

Midget

Nobady has any thoughts on this?

To reiterate, my code searches for folders named "[PR#], [Serial],
[Name]", and I want to be able to use a wildcard in place of PR# and
Name so that it is only going to open the folder with the same serial
number as the record I am currently on.

I would think there has to be a way to accomplish this, but I havent
had any luck up to this point.
 

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