wildcard issues

hudaz

Registered User.
Local time
Today, 03:46
Joined
Jan 22, 2013
Messages
28
Hi all,

I've been struggling to get a wildcard to work when trying to open a pdf within a web browser. I've pasted the code below i'm just trying to prove the concept before implementing it into the proper database so excuse the lack of a naming convention :-)

WebBrowser20.Object.Navigate "O:\Spec_PDF" & Text4 & "-" & Text6 & "*" & ".pdf"

so i have a text4 which is a job number, text6 which is a version number, it is trying to display pdfs with the following naming convention ####-####-variable text.pdf

could somebody help ?

thanks in advance.

Andy
 
1) You really should rename your controls. Two years from now, when someone goes in to tweak the program, trying to figure out what Text4 and Text6 are will make their job a LOT harder. It also makes it harder to catch errors: When you're trying to, say, concatenate a name, it's way easier to figure out what the problem is if the code says, say,
Code:
txtNameFirst & " " & txtNameOfBusiness
than
Code:
Text73 & " " & Text211

2) It's REALLY hard to figure out what's going on with the lack of details in the original post. First guess is that you're missing a slash between Spec_PDF and the name of the file. Second guess would be that the unnamed web browser needs a specific file name and isn't set up to just open all files matching a wildcard.

If those guesses aren't right, I would suggest posting actual code and specific information.
 
I don't think you can navigate to a wildcarded address?
What of you pasted that into a browser ? I'm sure it would error out.
 
I think Minty is correct. You cannot navigate to a wildcard.
 

Users who are viewing this thread

Back
Top Bottom