![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
If I create a field as a hyperlink, Access will open the hyperlink if I single click it. |
#3
| |||
| |||
|
|
Salad wrote: If I create a field as a hyperlink, Access will open the hyperlink if I single click it. I guess there isn't a solution. The developers at Microsoft had a brain fart when they decided to implement hyperlinks into Access. |
#4
| |||
| |||
|
|
Salad wrote: Salad wrote: If I create a field as a hyperlink, Access will open the hyperlink if I single click it. I guess there isn't a solution. The developers at Microsoft had a brain fart when they decided to implement hyperlinks into Access. hehe, just the one? how about a textbox, underlined and blue with a doubleclick event =RunFile([TextBox]) Code below... not sure of origin, not mine you can tell by lack of naming conventions and exit functions all over the place. --- code start --- Declare Function WinAPI_ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Function RunFile(pstrShell As String, Optional pstrWhat As String, Optional pvarRunStyle As Variant, Optional pstrParam As String) Dim runstyle As String, workdirpath As String, FilePath As String Dim success As Variant If IsMissing(pvarRunStyle) Then runstyle = "1" 'Run it normally, in a window Else runstyle = pvarRunStyle End If 'workdirpath = GetPath(strshell) 'define working directory FilePath = pstrShell ' and the document or exe, with path If Len(pstrParam) Then success = WinAPI_ShellExecute(0, pstrWhat, FilePath, pstrParam, workdirpath, runstyle) Exit Function End If If Len(pstrWhat) Then success = WinAPI_ShellExecute(0, pstrWhat, FilePath, vbNullString, workdirpath, runstyle) Else success = WinAPI_ShellExecute(0, vbNullString, FilePath, vbNullString, workdirpath, runstyle) End If RunFile = success End Function --- code end --- -- Pretentious? Moi? |
#5
| |||
| |||
|
|
Salad wrote: Salad wrote: If I create a field as a hyperlink, Access will open the hyperlink if I single click it. I guess there isn't a solution. The developers at Microsoft had a brain fart when they decided to implement hyperlinks into Access. hehe, just the one? |
|
how about a textbox, underlined and blue with a doubleclick event =RunFile([TextBox]) Code below... not sure of origin, not mine you can tell by lack of naming conventions and exit functions all over the place. --- code start --- Declare Function WinAPI_ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Function RunFile(pstrShell As String, Optional pstrWhat As String, Optional pvarRunStyle As Variant, Optional pstrParam As String) Dim runstyle As String, workdirpath As String, FilePath As String Dim success As Variant If IsMissing(pvarRunStyle) Then runstyle = "1" 'Run it normally, in a window Else runstyle = pvarRunStyle End If 'workdirpath = GetPath(strshell) 'define working directory FilePath = pstrShell ' and the document or exe, with path If Len(pstrParam) Then success = WinAPI_ShellExecute(0, pstrWhat, FilePath, pstrParam, workdirpath, runstyle) Exit Function End If If Len(pstrWhat) Then success = WinAPI_ShellExecute(0, pstrWhat, FilePath, vbNullString, workdirpath, runstyle) Else success = WinAPI_ShellExecute(0, vbNullString, FilePath, vbNullString, workdirpath, runstyle) End If RunFile = success End Function --- code end --- |
![]() |
| Thread Tools | |
| Display Modes | |
| |