Adding a hyperlink to a form

mikefish

New member
Local time
Today, 02:10
Joined
Jan 30, 2008
Messages
8
Hi

Very new to this but...

I am using Access 2000

I have a table containing a column labelled ID which contains a series of non sequential numbers.

I need to create a form that includes either a clickable text hyperlink or a command button that sends me to...

http://www.someplace.com?ID=<the id number stored for that row>

the http://www.someplace.com?ID= never changes but the <ID value> is different for each row

the form then steps through each row one at a time.

Allready have the form working and searching by criteria i need working just can't get it to display the hyperlink with the ID value.
I can insert a fixed hyperlink ok, just no one with the ID appended.

If there is no way to do that then how do i go about createing a new url column in my database by combining 'http://www.someplace.com' with '<ID>' which I can then show on the form.

Hope this makes sense and thanks in advance.

Mike
 
Just use this as the text box's Control Source:

="http://www.someplace.com?ID=" & [YourIDFieldNameHereInSquareBrackets]

And then set the IsHyperlink property to YES and it will show blue underline and the hand when the cursor moves across it and then in the click event of the text box use:

FollowHyperlink Me.YourTextBoxName
 
Thanks Bob, exactly what I was after, one small issue...

When i click on the link (which is coirrect) I get the following error

Dispatch can't find the macro 'FollowHyperlink ME.'

The macro (or its macro group) dosent exist...

Di I have to create a FollowHyper link Macro or do i just have a syntax error in my on click which is...

FollowHyperlink Me.Feedback

My text box is named Feedback
 
Try assigning it to a string variable first before using it.
 
Code:
Dim strLink As String

strLink = Me.Feedback

FollowHyperlink strLink

and you might put a break point in so that you can see what the value of strLink is actually being passed.
 
Thanks Bob, works perfectly, and even better I understand how it works so learnt new skills, much appreciated.

As luck would have it the web site I was accessing just changed the way they access that page so I have to rethink my approach... Murphy is a Webmaster...
 

Users who are viewing this thread

Back
Top Bottom