get hyperlink from URL stored as text

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

Guest

One of the fields I import into an Access table is a URL. I store it as text
because I need to export it out again as text (so I don't want to make this
field a hyperlink). What I want is to create another field (either in the
same table or another table) that is a hyperlink. I can figure out how to do
this manually, but since I need to do this every day, I would like to create
a hyperlink field through code.

Can someone help me out with the code and where to put the code (would I
need to put it in a button click event or ?).

Thank you, Judy
 
Thank you for responding to my question, but I still have a problem.

I typed the code below into the txtSAR_Link_Click() event:
FollowHyperlink: [txtSAR_Link] & "#"
I get a Compile error (with the & hilighted):
Expected: expression

Please give more details about where I would put the line you provided.

Thank you, Judy

Allen Browne said:
Try:
FollowHyperlink: [MyTextField] & "#"

More info on how to construct the string for the hyperlink:
http://allenbrowne.com/casu-09.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Judy Ward said:
One of the fields I import into an Access table is a URL. I store it as
text
because I need to export it out again as text (so I don't want to make
this
field a hyperlink). What I want is to create another field (either in the
same table or another table) that is a hyperlink. I can figure out how to
do
this manually, but since I need to do this every day, I would like to
create
a hyperlink field through code.

Can someone help me out with the code and where to put the code (would I
need to put it in a button click event or ?).

Thank you, Judy
 
Sorry: the ":" should not be there.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Judy Ward said:
Thank you for responding to my question, but I still have a problem.

I typed the code below into the txtSAR_Link_Click() event:
FollowHyperlink: [txtSAR_Link] & "#"
I get a Compile error (with the & hilighted):
Expected: expression

Please give more details about where I would put the line you provided.

Thank you, Judy

Allen Browne said:
Try:
FollowHyperlink: [MyTextField] & "#"

More info on how to construct the string for the hyperlink:
http://allenbrowne.com/casu-09.html

Judy Ward said:
One of the fields I import into an Access table is a URL. I store it
as
text
because I need to export it out again as text (so I don't want to make
this
field a hyperlink). What I want is to create another field (either in
the
same table or another table) that is a hyperlink. I can figure out how
to
do
this manually, but since I need to do this every day, I would like to
create
a hyperlink field through code.

Can someone help me out with the code and where to put the code (would
I
need to put it in a button click event or ?).

Thank you, Judy
 
Back
Top