chnage hyper link

  • Thread starter Thread starter themase
  • Start date Start date
T

themase

hello i have a field in access which is a hyperlink ! i want to change it to
a text field but when i do i get the following
(e-mail address removed)#mailto:[email protected]#

i want to get rid of everything after uk i.e.#mailto etc can this be done

thanks in advance
 
You could do a calculated field, or run an update query on the table to
extract everything up to the #, by using the left function. the number of
characters could be identified by using the InStr and Len functions:
(say the email field is called )(You'll have to check the syntax on
Instr, I may be remembering it incorrectly)
left([Email],Len([Email]) - instr([Email],"#"))

You may also need to add or subtract 1 in the number of characters argument
to get it right.
 
themase said:
hello i have a field in access which is a hyperlink ! i want to change it to
a text field but when i do i get the following
(e-mail address removed)#mailto:[email protected]#

i want to get rid of everything after uk i.e.#mailto etc can this be done

You can use the HyperlinkPart method to extract the address component
.... the section between the two # characters ... then use the Mid
function to discard the "mailto:" piece.

If the field containing mailto addresses is hyperlink data type, or the
text equivalent of a hyperlink, you can get the part you want like this:

SELECT Mid$(HyperlinkPart(YourField, acAddress), 8) AS address
FROM YourTableNameHere;

That SELECT statement will return an empty string for cases where
YourField is Null.
 
hello nearly there i am getting this result now
(e-mail address removed)#mailto:

any ideas

Frank H said:
You could do a calculated field, or run an update query on the table to
extract everything up to the #, by using the left function. the number of
characters could be identified by using the InStr and Len functions:
(say the email field is called (e-mail address removed)
 
Back
Top