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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about Hyperlinking 2

Status
Not open for further replies.

Glohamar

Programmer
Sep 3, 2003
248
0
0
US
I am wanting to link to web pages in my company's intranet. Right now, when I click a command button to open the web page it depends on whether or not it is saved with .htm or .html. Is there away to capture a 404 error in access?

Also, if I wanted to use a textbox as the item to click to open the web page, how would I go about doing so? My sub-form is set to continuous so that revisions can be displayed. I need to be able to enter information into the textbox and the as soon as I exit out, turn it to a hyperlink.

I am using Access 2000.

Any help will be appreciated,

Dave
 
You can have a hyperlink in a field by setting the data type to hyperlink.

If it's just a text box, unbound, then set the Is Hyperlink property to Yes.

Also, I don't know of a way you could capture a 404 error since the error occurs in the browser, not the database.
 
Thanks for the response Onyxpurr. Unfortunately, my textbox is bound to a table. Do you think there might be away around this to where I can enter data, and after update it would become a hyperlink and remain a hyperlink? I thought about the OnClick and OnDblClick events. DblClick for the hyperlink part and Click to enter data. Is this possible in Access?

Thanks for the help.

Dave
 
Thanks for the help. This answers my questions.

Dave
 
Kimberly....

Here's the answer. A hyperlink field has three parts to it...the first is the display text, the second is the address, and the third is the subaddress. We have only been supplying the display name....there is no link for it truly. Take a look at the below line and change yours accordingly....

rstSoftOrders("Attachments").Value = "C:\Test\ecr" & CStr(rstSoftOrders("ECRNumber")) & ".doc#C:\Test\ecr" & CStr(rstSoftOrders("ECRNumber")) & ".doc"

Basically you need to put a # at the end of you line and repeat everything again. This will make it display the .doc file and also link it up....Let me know.

****************************
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
MCSA, CNA, Net+, A+
w: rljohnso@stewart.com
h: wildmage@tampabay.rr.com
 
Robert,
AWESOME! I changed my line and it worked perfectly. I am going to try and see if I can tweek the code you gave me to auto name a file

They want the word file you helped me create to have a link to the excel file for the financials. Of course it needs the same naming convention (ecrf1234.xls) so everything is in one place.

Hopefully I can get that done today. I'm hoping the vb for word is the same as what you gave me. Otherwise I'm in for a bit of a search.

Thank you so much for all your help
 
mstrmage1768,
Thanks for the post for 1.5 YEARS ago. It solved my problem!! This forum rocks!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top