How to set hyperlink when table field has no data - FP2000 asp

  • Thread starter Thread starter Michael Edwards
  • Start date Start date
M

Michael Edwards

I am using FP2000 with an Access Database in the fpdb folder. I store the
url of the party in the database. In a query, I have a field that returns
either "Homepage" or a zero length string. I set the hyperlink to the table
cell to be the URL from the record. It works great; however, if there is no
"Homepage", the cell results are "_" and if you click on it, it brings you
to the homepage of my website.

Is there a way to disable the cell hyperlink if the cell should be blank? or
is there a way to tell the cell to be blank if it is a null value?
 
find in your code where the URL field gets displayed, and change it to this:
<% If fp_rs("URL")> " " then %><a href="<%=FP_FieldLink(fp_rs,"URL")%>"><%
End If %>Also, the URL field in your database needs to be a full URL, i.e.
http://www, not www



--

~ Kathleen Anderson
Microsoft FrontPage MVP
Spider Web Woman Designs
http://www.spiderwebwoman.com/resources/
 
Thanks Kathleen, I should've though of that.

I figured out another fix....I put an IIF statement in the query such that
if the value is null, that instead of putting in a zero length string "", I
inserted a single space string by inserting " ". Very subtle change, but it
removed the hyperlink spaceholder as well, so there is nothing to click on.

Sincerely,
Mike
 
Back
Top