943,948 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Aug 24th, 2008
0

Please help---urgent!!

Expand Post »
Is it possible to open a hyperlink and display the data in a label or text box?

I have a table in Access where the data type of a record is a hyperlink. I would like to open that hyperlink and display the data in a label or text box.

It is for a school project and so quick responses would really be appreciated. I'm also sorry as this is my second thread on the matter, but no one replied to the last thread. Hopefully you can understand the urgency.

Thank you
Daniel.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
iamdaniel123 is offline Offline
15 posts
since Aug 2008
Aug 24th, 2008
0

Re: Please help---urgent!!

Hi Daniel,

When you mean data do you mean the webpage itself? If you want a webpage to be displayed within VB follow the instructions of this link:
http://www.trap17.com/index.php/how-...er_t31604.html
Last edited by Don Gino; Aug 24th, 2008 at 8:04 pm.
Reputation Points: 16
Solved Threads: 2
Junior Poster
Don Gino is offline Offline
102 posts
since Oct 2006
Aug 24th, 2008
0

Re: Please help---urgent!!

no. its actually a text file.
hmmm...its hard to explain!
the user inputs the directory they would like to save the text file, the program saves that directory in access as a hyperlink. then, the user can access the file through the hyperlink?
..is it possible?!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
iamdaniel123 is offline Offline
15 posts
since Aug 2008
Aug 25th, 2008
0

Re: Please help---urgent!!

s. u can use the file system object and textstream to open a textfile, read the data and display it in a lable or a textbox.

Add the Microsoft Scripting Runtime in the References. Create objects of the following.
FileSystemObject and TextStream


Try out these, if u still cant make the code then 'll be there to help u out.

Regards
Shaik Akthar
Reputation Points: 26
Solved Threads: 40
Posting Whiz
aktharshaik is offline Offline
316 posts
since Aug 2008
Aug 25th, 2008
0

Re: Please help---urgent!!

thank you soo much shaik for your time and help!...but i'm still unsure on how to open the text file from the hyperlink in my access database?....

cheers
Daniel
Reputation Points: 10
Solved Threads: 0
Newbie Poster
iamdaniel123 is offline Offline
15 posts
since Aug 2008
Aug 25th, 2008
0

Re: Please help---urgent!!

Open the recordset. Extract the field with hyperlink and connect it to the File System Object and TextStream

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Dim rs as New ADODB.Recordset
  2. Dim FSO As New FileSystemObject
  3. Dim FL As TextStream
  4.  
  5. rs.Open "SELECT hLinkField FROM MYTABLE WHERE ID = 1", con,adopenKeySet, adLockReadOnly
  6.  
  7. 'If record found then
  8. If rs.BOF = False Then
  9. 'open the file in the field which contains
  10. 'the hyperlink to the textfile
  11. Set FL=FSO.OpenTextFile(rs!hLinkField, & _
  12. ForReading, False)
  13. Text1.Text = ""
  14. While Not FL.AtEndOfStream
  15. Text1.Text = Text1.Text & FL.ReadLine
  16. Wend
  17. FL.Close
  18. End If
  19.  
  20. Set FL = Nothing
  21. Set FSO = Nothing

Regards
Shaik Akthar
Last edited by aktharshaik; Aug 25th, 2008 at 1:24 am.
Reputation Points: 26
Solved Threads: 40
Posting Whiz
aktharshaik is offline Offline
316 posts
since Aug 2008
Aug 25th, 2008
0

Re: Please help---urgent!!

Here I assume u know how to connect to your database. i have considered ADODB.Connection object "con" which is global and already attached to the database.

Regards
Shaik Akthar
Reputation Points: 26
Solved Threads: 40
Posting Whiz
aktharshaik is offline Offline
316 posts
since Aug 2008
Aug 25th, 2008
0

Re: Please help---urgent!!

thank you shaik, i used that code but it says there is a complie error: User-defined type not defined...with
fso As New FileSystemObject highlighted

???
Reputation Points: 10
Solved Threads: 0
Newbie Poster
iamdaniel123 is offline Offline
15 posts
since Aug 2008
Aug 25th, 2008
0

Re: Please help---urgent!!

Here I assume u know how to connect to your database. i have considered ADODB.Connection object "con" which is global and already attached to the database.

Regards
Shaik Akthar
um...to connect my database...
Set db = OpenDatabase(App.Path & "\database.mdb")
Set rst = db.OpenRecordset("table")
Reputation Points: 10
Solved Threads: 0
Newbie Poster
iamdaniel123 is offline Offline
15 posts
since Aug 2008
Aug 25th, 2008
0

Re: Please help---urgent!!

sorry...i forgot to add the reference. but now an error message comes up saying
Run-Time error 438:
Object does not support this property or method with
rst.Open "SELECT hLinkField....." highlighted.
so, i don't know what to do!

???

cheers
Daniel
Reputation Points: 10
Solved Threads: 0
Newbie Poster
iamdaniel123 is offline Offline
15 posts
since Aug 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: VB Oracle Connectivity
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Out of Memory in large vb6 app





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC