Hyperlink display using access database with FP2003

G

Guest

I have an ASP (Access 2003) set up and working with FP2003. One field is a
hyperlink and displays as the text to display (versus the actual hyperlink)
in the Access DB. In FP however, the field displays as the link address
rather than the text I want to display.

How do I get the displayed text on the ASP to be the text I want and not the
url.

Thanks.
 
T

Thomas A. Rowe

Add a second field in the database, and use that to label the link.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
J

Jim Buyens

Store the URL and the display text as separate fields,
then use a custom query like:

SELECT '<a href="' & linkurl & '">' & linktest & '</a>' AS
linkhtml, ...

where linklurl and linktest are the names of the two
database fields. Then, after the wizard completes, right-
click the <<linkhtml>> field, choose Database Column Value
Properties, and select Column Value Contains HTML.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
G

Guest

Thanks Jim. I have your book and use it as a reference regularly. Forgive
me, I'm not quite sure I understand. I've added an additional field to the
table in the access database that will serve as the label for the url. I'm
not following what to do next in FP.

Thanks.
 
T

Thomas A. Rowe

See Jim Buyen's example for how to create the link.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
J

Jim Buyens

Rerun the Databsae Results Wizard and on page 2, click
Custom Query and then Edit. This will display the SQL
statement your query is using. It probably begins

SELECT * FROM ...

although it may contain a list of field names, like this:

SELECT linkurl, linktext FROM ...

Add a computed field right after the SELECT keyword as
shown below:

SELECT '<a href="' & linkurl & '">' & linktext & '</a>' AS
linkhtml, * FROM ...

where linklurl and linktest are the names of the two
database fields. This creates an "artificial" field named
linkhtml, and with with values like:

<a href="www.ducks.com">Ducks</a>
<a href="www.geese.com">Geese</a>
<a href="www.lamas.com">Lamas</a>

On page 3 of the wizard, click Edit List and make sure the
linkhtml field is being reported.

Then, after the wizard completes, right-click the
<<linkhtml>> field, choose Database Column Value
Properties, and select Column Value Contains HTML.

Since you also have the book, you may want to consult
pp. 903-910, which describe two more ways of doing this.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top