Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button to launch Hyperlink

Status
Not open for further replies.

SpandexBobcat

Technical User
Jul 31, 2003
332
GB
Hi folks,

I have a form with a bound textbox (to a hyperlink field) that is set to invisible. The form shows the results of a search so there are multiple records in the recordsource...

What I need is a button to open the hyperlink of the corresponding record. I have searched around but can't quite put my finger on a post that I can use...

BS_Info tble Field:
BS_Auto - primary
PDF_File - Hyperlink

Form frmFindWord content:
txtHyper
cmdPDF_File

Please help a needy novice!

Simon
 
I solved my own problem...

In the OnClick event I placed:
Code:
Application.FollowHyperlink [TextBoxName]
And it now works. There is still one problem, it takes quite a while to open the document and there is no indication that anything is happening until it appears on the screen (its a PDF) I know using the Shell command shows the application opening but this doesnt happen with hyperlinks...

Any ideas on how to show my users that something is actually happening?

Regards,

Simon

"A picture is not worth a 1000 words on the Internet. The information is in the text."
 
Hi Spandex,

Im not sure if this is what your after but you should be able to use;

Code:
Me.Hyper.Hyperlink.Follow

where Hyper is the name of the Hyperlink field "PDF_File" in your case. This assumes you are using a continuous form.

You may also be interested in this;

Code:
Me.Link.Action = acOLEActivate

where Link is bound to an OLE object field in a table.

And thank you for speaking to Mike for me, much obliged :)

Sim

----------------------------------------
I was once asked if I was ignorant or just apathetic. I said, "I don't know, and I don't care."
----------------------------------------
 
Blimey you going a bit quick for me today.....

Try looking into the

screen.mousepointer

events, you can set this before triggering the hyperlink but I'm not sure when you would get the chance/option to set it back.

FYI: Screen.mousepointer = 11 is the hourglass.

Sim

----------------------------------------
I was once asked if I was ignorant or just apathetic. I said, "I don't know, and I don't care."
----------------------------------------
 
Hi Simon,

I have been banging my head on the screen for days over this, I put a post up then crack it myself just after it!!!

The hourglass event is fine, how do I turn it off though!!!!

Simon

"A picture is not worth a 1000 words on the Internet. The information is in the text."
 
Got it, = 10 seems to do the trick!

Thanks for the guidance.

"A picture is not worth a 1000 words on the Internet. The information is in the text."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top