ACC97: Hyperlink Is Not Displayed as Expected in Report HeaderID: Q191100
|
When you place a Hyperlink field in a report header or section header, it may not be displayed in the proper format. The text box is displayed with number signs (#), as shown below, instead of just "Display Text" or "Link to File or URL:"
Microsoft provides programming examples for illustration only, without warranty
either expressed or implied, including, but not limited to, the implied warranties of
merchantability and/or fitness for a particular purpose. This article assumes that you
are familiar with the programming language being demonstrated and the tools used to
create and debug procedures. Microsoft support professionals can help explain the functionality
of a particular procedure, but they will not modify these examples to provide added
functionality or construct procedures to meet your specific needs. If you have limited
programming experience, you may want to contact a Microsoft Certified Solution Provider
or the Microsoft fee-based consulting line at (800) 936-5200. For more information about
Microsoft Certified Solution Providers, please see the following page on the World Wide Web:
http://www.microsoft.com/mcsp/For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://www.microsoft.com/support/supportnet/overview/overview.aspYou can use the following function to eliminate the unwanted number signs.
Option Explicit
Public Function FParseHyperlink(strHyp As String) As String
' Determine if there is a '#' sign in the field.
If InStr(1, strHyp, "#") > 0 Then
' Check the first character of the hyperlink.
' If it is a '#', then no Display Text has
' been entered for the hyperlink; output the
' Link to File URL.
If Left(strHyp, 1) = "#" Then
If InStr(1, Right(strHyp, Len(strHyp) - 1), "#") Then
FParseHyperlink = Left(Right(strHyp, Len(strHyp) - 1), _
InStr(1, Right(strHyp, Len(strHyp) - 1), "#") - 1)
End If
Else
' If the first character was something other than '#',
' output the Display Text for field.
FParseHyperlink = Left(strHyp, InStr(1, strHyp, "#") - 1)
End If
End If
End Function
Group Header: Yes
Control Source: =IIf(IsNull([HomePage])=False,FParseHyperlink([HomePage])) Fore Color: 16711680 Font Underline: Yes
Microsoft has confirmed this to be a problem in Microsoft Access 97
Group Header: Yes
For more information about creating hyperlinks, search the Help Index for "hyperlink fields," or ask the Office Assistant.
Additional query words: pra URL web site address
Keywords : kbdta RptProb
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: July 13, 1999