If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Hyperlink field
I hope this is the right Access sub-group for this post -
apologies if not! I'm setting up a catalogue of our team's files. This is in Access, but the problem I am coming across also seems to apply to hyperlinks in Excel or Word One of the fields I have included is the filepath excluding filename - i.e. the containing folder for the file. I have made this a hyperlink field so that it can be clicked on to take the user to that folder in Windows Explorer. This works OK, but although the address is set to the 'relative path' - i.e. "drive letter\folder\folder" when the link is clicked on it opens Explorer at the 'absolute path' - i.e. "server\share\folder". I know its probably better practice to use the UNC instead of a drive letter, but I feel this is more likely to be confusing - if people are used to thinking of the folder as "H:\Sales\...", it would be better if I could make Explorer open up here and show the folder under "My Computer" instead of "My Network Places". Everybody who would use the database would have the same share mapped to H:\ anyway, so this would still work for the whole team. If anyone knows what I need to do, to please could you let me know? Thanks for your help |
#2
|
|||
|
|||
"Adam" wrote in news:0b1701c4ac72
: If anyone knows what I need to do, to please could you let me know? TBH, I think it would be simpler to junk all the hyperlink stuff, and just use the Control_DblClick event to call the Shell method with Windows Explorer. Then you could do whatever your users think is right, rather than whatever the Access team thought was right when they were putting it together. HTH Tim F |
#3
|
|||
|
|||
"Adam" wrote in news:0b1701c4ac72
: If anyone knows what I need to do, to please could you let me know? TBH, I think it would be simpler to junk all the hyperlink stuff, and just use the Control_DblClick event to call the Shell method with Windows Explorer. Then you could do whatever your users think is right, rather than whatever the Access team thought was right when they were putting it together. HTH Tim F |
#4
|
|||
|
|||
"Adam" wrote in news:0b1701c4ac72
: If anyone knows what I need to do, to please could you let me know? TBH, I think it would be simpler to junk all the hyperlink stuff, and just use the Control_DblClick event to call the Shell method with Windows Explorer. Then you could do whatever your users think is right, rather than whatever the Access team thought was right when they were putting it together. HTH Tim F |
#5
|
|||
|
|||
TBH, I think it would be simpler to junk all the hyperlink stuff, and just use the Control_DblClick event to call the Shell method with Windows Explorer. Thanks for the suggestion - this seemed to work (Path is the name of the text box on form that this event belongs to): Private Sub Path_DblClick(Cancel As Integer) Dim strFilePath As String Dim strExplorer As String strFilePath = Path strExplorer = "C:\WINNT\explorer.exe " & strFilePath Shell strExplorer, vbNormalFocus End Sub Only problem is that this opens Explorer without the folders - i.e. "My Computer" view - if anybody knows what I would need to do to make folder open in 2-pane view by default, this would be much appreciated? Many thanks again |
#6
|
|||
|
|||
TBH, I think it would be simpler to junk all the hyperlink stuff, and just use the Control_DblClick event to call the Shell method with Windows Explorer. Thanks for the suggestion - this seemed to work (Path is the name of the text box on form that this event belongs to): Private Sub Path_DblClick(Cancel As Integer) Dim strFilePath As String Dim strExplorer As String strFilePath = Path strExplorer = "C:\WINNT\explorer.exe " & strFilePath Shell strExplorer, vbNormalFocus End Sub Only problem is that this opens Explorer without the folders - i.e. "My Computer" view - if anybody knows what I would need to do to make folder open in 2-pane view by default, this would be much appreciated? Many thanks again |
#7
|
|||
|
|||
TBH, I think it would be simpler to junk all the hyperlink stuff, and just use the Control_DblClick event to call the Shell method with Windows Explorer. Thanks for the suggestion - this seemed to work (Path is the name of the text box on form that this event belongs to): Private Sub Path_DblClick(Cancel As Integer) Dim strFilePath As String Dim strExplorer As String strFilePath = Path strExplorer = "C:\WINNT\explorer.exe " & strFilePath Shell strExplorer, vbNormalFocus End Sub Only problem is that this opens Explorer without the folders - i.e. "My Computer" view - if anybody knows what I would need to do to make folder open in 2-pane view by default, this would be much appreciated? Many thanks again |
#8
|
|||
|
|||
A colleague suggested just adding in the /e switch after
(strExplorer = "C:\WINNT\explorer.exe) - this worked OK Thanks again for your help Adam |
#9
|
|||
|
|||
A colleague suggested just adding in the /e switch after
(strExplorer = "C:\WINNT\explorer.exe) - this worked OK Thanks again for your help Adam |
#10
|
|||
|
|||
A colleague suggested just adding in the /e switch after
(strExplorer = "C:\WINNT\explorer.exe) - this worked OK Thanks again for your help Adam |
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Autonumber | Ally H. | General Discussion | 7 | August 27th, 2004 04:51 PM |
Bug? - Group By turning field property from Memo to Text | Callaway | Running & Setting Up Queries | 3 | June 28th, 2004 04:37 AM |
NUMBERING the pages | Bob | New Users | 7 | June 14th, 2004 12:20 AM |
Hyperlink field and icon | FatMax | Using Forms | 1 | June 12th, 2004 08:59 PM |
2 Qs: Calculated Field & Composite Unique Index | David F | New Users | 2 | June 6th, 2004 09:03 PM |