A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Hyperlink - partially opening



 
 
Thread Tools Display Modes
  #1  
Old May 4th, 2010, 05:42 PM posted to microsoft.public.access.forms
Williams
external usenet poster
 
Posts: 39
Default Hyperlink - partially opening

I have a field that is a Hyperlink data type. The field contains the path to
a PDF files. When I click the hyperlink in the table or form view a new
window starts to appear then disappears immediately. Why can't I just click
the window and have the hyperlink automatically appear on my screen? If I
manually go to the directory that stores the PDF I can open the file. Any
suggestions?
  #2  
Old May 4th, 2010, 10:43 PM posted to microsoft.public.access.forms
Mark Andrews[_4_]
external usenet poster
 
Posts: 169
Default Hyperlink - partially opening

I would use the shell function:
Option Compare Database
Option Explicit

Private Declare Function 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
Public Function OpenDoc(ByVal DocFile As String) As Long
OpenDoc = ShellExecute(0&, vbNullString, DocFile, vbNullString,
vbNullString, vbNormalFocus)
End Function



With some kind of click event to call the code:
Private Sub cmdOpenDirectory_Click()
If (Nz(Me.DocumentDirectory, "") "") Then
Call OpenDoc(Me.DocumentDirectory)
Else
MsgBox "You must assign a document directory.", vbOKOnly, "Error"
End If
End Sub


HTH,

--
Mark Andrews
RPT Software
http://www.rptsoftware.com
http://www.donationmanagementsoftware.com

"Williams" wrote in message
...
I have a field that is a Hyperlink data type. The field contains the path
to
a PDF files. When I click the hyperlink in the table or form view a new
window starts to appear then disappears immediately. Why can't I just
click
the window and have the hyperlink automatically appear on my screen? If I
manually go to the directory that stores the PDF I can open the file. Any
suggestions?


  #3  
Old May 6th, 2010, 08:29 PM posted to microsoft.public.access.forms
Williams
external usenet poster
 
Posts: 39
Default Hyperlink - partially opening

I am beginning to think that perhaps my problem is related to Adobe. After I
read your post, I thought to myself "why all the code for a hyperlink field".
I thought the purpose of the hyperlink data type was so you could just click
the path and open the file. All of my hyperlinks are to PDF files, so as a
test I did a hyperlink to an different file format & it worked fine. Any
ideas on why other file formats would open in a hyperlink field, but not an
adobe file? As I mentioned previously, I can open the adobe file without a
problem outside of access. But when I click the hyperlink to the adobe file
the window partially appears then disappears.

"Mark Andrews" wrote:

I would use the shell function:
Option Compare Database
Option Explicit

Private Declare Function 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
Public Function OpenDoc(ByVal DocFile As String) As Long
OpenDoc = ShellExecute(0&, vbNullString, DocFile, vbNullString,
vbNullString, vbNormalFocus)
End Function



With some kind of click event to call the code:
Private Sub cmdOpenDirectory_Click()
If (Nz(Me.DocumentDirectory, "") "") Then
Call OpenDoc(Me.DocumentDirectory)
Else
MsgBox "You must assign a document directory.", vbOKOnly, "Error"
End If
End Sub


HTH,

--
Mark Andrews
RPT Software
http://www.rptsoftware.com
http://www.donationmanagementsoftware.com

"Williams" wrote in message
...
I have a field that is a Hyperlink data type. The field contains the path
to
a PDF files. When I click the hyperlink in the table or form view a new
window starts to appear then disappears immediately. Why can't I just
click
the window and have the hyperlink automatically appear on my screen? If I
manually go to the directory that stores the PDF I can open the file. Any
suggestions?


.

  #4  
Old May 6th, 2010, 10:35 PM posted to microsoft.public.access.forms
Mark Andrews[_4_]
external usenet poster
 
Posts: 169
Default Hyperlink - partially opening

Here's a guess:
http://support.microsoft.com/kb/897755


"Williams" wrote in message
...
I am beginning to think that perhaps my problem is related to Adobe.
After I
read your post, I thought to myself "why all the code for a hyperlink
field".
I thought the purpose of the hyperlink data type was so you could just
click
the path and open the file. All of my hyperlinks are to PDF files, so as
a
test I did a hyperlink to an different file format & it worked fine. Any
ideas on why other file formats would open in a hyperlink field, but not
an
adobe file? As I mentioned previously, I can open the adobe file without
a
problem outside of access. But when I click the hyperlink to the adobe
file
the window partially appears then disappears.

"Mark Andrews" wrote:

I would use the shell function:
Option Compare Database
Option Explicit

Private Declare Function 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
Public Function OpenDoc(ByVal DocFile As String) As Long
OpenDoc = ShellExecute(0&, vbNullString, DocFile, vbNullString,
vbNullString, vbNormalFocus)
End Function



With some kind of click event to call the code:
Private Sub cmdOpenDirectory_Click()
If (Nz(Me.DocumentDirectory, "") "") Then
Call OpenDoc(Me.DocumentDirectory)
Else
MsgBox "You must assign a document directory.", vbOKOnly, "Error"
End If
End Sub


HTH,

--
Mark Andrews
RPT Software
http://www.rptsoftware.com
http://www.donationmanagementsoftware.com

"Williams" wrote in message
...
I have a field that is a Hyperlink data type. The field contains the
path
to
a PDF files. When I click the hyperlink in the table or form view a
new
window starts to appear then disappears immediately. Why can't I just
click
the window and have the hyperlink automatically appear on my screen?
If I
manually go to the directory that stores the PDF I can open the file.
Any
suggestions?


.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:08 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.