How do I get file names from Hyperlink string in Access

P

pjmclaughlin

I want to create a new text column based on the file name of a Hyperlink
column - i.e. I want everything within the "#" separators - anyone know how
to get these?
 
K

Ken Snell \(MVP\)

Post an example of the hyperlink string that contains the value you want to
parse out from the string.
 
P

pjmclaughlin

Figured it out:
The query would be:

URI:
Left$(Mid$([Hyperlink],InStr(1,[Hyperlink],"#",0)+1),Len(Mid$([Hyperlink],InStr(1,[Hyperlink],"#",0)+1))-1)

Where [Hyperlink] is the field name I wanted to parse!
 
K

Ken Snell \(MVP\)

This may be a bit simpler:

Mid(Left([Hyperlink],Len([Hyperlink]) - 1), InStr([Hyperlink], "#") + 1)

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


pjmclaughlin said:
Figured it out:
The query would be:

URI:
Left$(Mid$([Hyperlink],InStr(1,[Hyperlink],"#",0)+1),Len(Mid$([Hyperlink],InStr(1,[Hyperlink],"#",0)+1))-1)

Where [Hyperlink] is the field name I wanted to parse!

pjmclaughlin said:
The string for the full Hyperlink would look like this:

Link 3#http://www.msn.com#

I would like to extract the http://www.msn.com from the string and
populate
a new column within access - so extracting everything within the # signs!
 

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