| View previous topic :: View next topic |
| Author |
Message |
andy777 Newbie

Joined: 01 Mar 2007 Posts: 1
|
Posted: Thu Mar 01, 2007 2:14 am Post subject: can I include hyperlinks in a BASE table? |
|
|
dear all,
beginner's question. I want to switch from Access so I am playing around with BASE. Only problem... can I include hyperlinks to, say, text files, in a BASE table and if so, how?
thanks
Andy |
|
| Back to top |
|
 |
Roger_Melly Newbie

Joined: 02 Mar 2007 Posts: 2
|
Posted: Sun Mar 04, 2007 7:02 am Post subject: |
|
|
| Oh yes me too...... |
|
| Back to top |
|
 |
QuazzieEvil Super User

Joined: 17 Jan 2007 Posts: 599 Location: Houston, TX
|
Posted: Mon Mar 05, 2007 9:49 am Post subject: |
|
|
to my knowledge there is no direct/automated way of create a hyperlink. you can accomlish it with oobasic, however.
If you want to associate a given record with a given file: you can store the path of the file as a column (and the program path which which to open it if they differ). Now, from a base form, create a button that is linked to the code to do the work
| Code: |
Sub cmdOpenFile_OnClick(event As Object)
Dim FilePath As String
Dim OpenWith As String
Dim Form As Object
Form = event.Source.getModel().getParent() REM GET FORM
REM ASSUMING THAT FILEPATH IS THE COLUMN NAME THAT CONTAINS THE
REM FILE PATH
FilePath=Form.getByName("FILEPATH").Text
REM ASSUMING THAT OPENWITH IS THE NAME OF THE COLUMN CONTAINING THE
REM PATH/NAME OF THE PROGRAM TO USE
OpenWith=Form.getByName("OPENWITH").Text
Shell(OpenWith & " " & FilePath ) REM OPEN THE FILE W/ SPECIFIED PROGRAM
End Sub
|
This should work (I have not tested it). The assumption here is that, when entering the record, a file path was specified as well as a program with which to open the file. if all your file are *.PDF, for instance you can hard code it or have it has default on the input form. |
|
| Back to top |
|
 |
independentpower General User

Joined: 06 Aug 2007 Posts: 37 Location: Hyde Park Vermont
|
Posted: Wed Oct 24, 2007 6:20 am Post subject: |
|
|
I'm even more of a beginner than those two apparently. Can you explain in a little more detail. I was able to make the button, but I don't know enough about base to run through that programming. Will I have to do this every time I create a new text field for a particular record? Can I link to a file instead of a document? That way I could have a number of documents for a particular record in one place. _________________ Patrick Corcoran
patrick.corcoran@independentpowerllc.com |
|
| Back to top |
|
 |
|