Displaying Access database table hyperlinks

  • Thread starter Thread starter Cory
  • Start date Start date
C

Cory

First I must admit I know nothing about databases and FP so don't be afraid
to tell me if there is an obvious solution.

I have an Access database with a single 'flat' table that I dumped into FP.
I used the little wizard to make a table to display it in an ASP file and it
worked fine with one exception. In the Access database I have fields of the
type "Hyperlink" which contain links that have both a display value and a
URL. IOW it may be a link to a vendor's website and have display text of
"ABC Corporation" with a URL of http://abccorp.com behind the text. Now when
the field values display in the table it first just displayed text
http://abccorp.com with not hyperlink. I saw how I can change the field type
in the table to inform it that the field contains hypertext and now I get
http://abccorp.com which now works as a hyperlink. Now my question is how do
I get it to appear as ABC Corporation with a hypertext link to the URL
underneath like in my Access database?

Thanks!
 
-----Original Message-----
First I must admit I know nothing about databases and FP
so don't be afraid to tell me if there is an obvious
solution.

I have an Access database with a single 'flat' table that
I dumped into FP. I used the little wizard to make a
table to display it in an ASP file and it worked fine
with one exception. In the Access database I have fields
of the type "Hyperlink" which contain links that have
both a display value and a URL. IOW it may be a link to a
vendor's website and have display text of "ABC
Corporation" with a URL of http://abccorp.com behind the
text. Now when the field values display in the table it
first just displayed text http://abccorp.com with not
hyperlink. I saw how I can change the field type
in the table to inform it that the field contains
hypertext and now I get http://abccorp.com which now
works as a hyperlink. Now my question is how do
I get it to appear as ABC Corporation with a hypertext
link to the URL underneath like in my Access database?

Set up your database so it has two separate fields for the
company name and URL. Define them both as Text

Then, in an Access Query or DRW Custom Query, define a
field like this:

SELECT "<a href=""" & [CoLink] & """>" & [CoName] & "</a>"
AS NameLink, othfld1, othfld2, ... FROM ...

Then, configure the DRW to display the NameLink field.

Also, right-click the resulting DRW column that displays
the NameLink field, choose Database Colum Value
Properties, and select Column Value Contains HTML and
Display As Hyperlink.

Jim Buyens
Microsoft FrontPage MVP
(e-mail address removed)
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*
 
Well most of what your wront is greek to me so maybe I'm in over my head. I
took what you gave me and noticed you were forming a hyperlink with text and
put my field names in where appreopriate but it vaugely complains htat "The
syntax of this subquery is incorrect". What I wrote in the "Field" was:

SELECT "<a href=""" & [Link] & """>" & [Publisher] & "</a>" AS NameLink,
othfld1, othfld2, ... FROM ...

None of this makes any sense to me. I tried to look up the SELECT function
but the only reference I found were to SQL and nothing specific. Tried
looking up NameLink and AS but found nothing in the help file. I'm guessing
you intended for me to make more substitutions but I have no idea what any
of this is or what it does. All I understand is the bits that form the URL.
Maybe you can explani to me what I'm doing wrong and explain what these
parts are.

Maybe I'll just use the sepreate field as a raw link. If it's a pain to
explan don't bother and I'll just make do with what I have. I just think
it's dumb that FP can't simply use the Hyperlink feild type in Access.
 
Try this:

Select * Form table...


Then on your page where you want the link to appear in HTML view do:

<a href="<%-recordset("Link")%>"><%=recordset("Publisher")%></a>

recordset = the name of the recordset that you use to with your select
statement above.

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

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Cory,

Based on the code snip you had provided, it appeared that you were hand
coding your ASP, which my code snip would have helped you to accomplish your
goal. If you are indeed working with the FP DRW, then you will need to wait
for someone to respond that use it, since only do hand coding. Sorry.

--

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

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Back
Top