avoid listing empty fields in a record?

  • Thread starter Thread starter Greg
  • Start date Start date
G

Greg

i have a table with just one field listed. with this,
some of my records are empty which of course leaves an
empty spot which is what i want. when i have the DB Wiz
displaying all this on a page, it leaves a space where
that record is empty. I want it to just list the records
with info in it and not the blank ones which leave a
gap. how do i do this? Thanks!
 
Greg:
Wrap the DatabaseResultColumn display area in a bit of script, like this:

<% If fp_rs("Municipality") > " " then %>

<li><b>Municipality:</b>&nbsp;<!--webbot bot="DatabaseResultColumn"
startspan

s-columnnames="ProgramArea,RecordNum,Date,ItemNumber,SplitItem,Session,PA_SA
,ActNumber,Section,Recipient,Municipality,FundsUse,DollarField1,DollarField2
,DollarField3,DollarField4,Any_Previous,DollarField5,FundNum,AgencyNum,SID,P
roject_Num,Description"
s-column="Municipality" b-tableformat="FALSE" b-hashtml="FALSE"
clientside
preview="&lt;font
size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Municipality&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" b-makelink
b-MenuFormat --><%=FP_FieldVal(fp_rs,"Municipality")%><!--webbot
bot="DatabaseResultColumn" i-CheckSum="33247" endspan --></li>

<% End If %>
 
-----Original Message-----
i have a table with just one field listed. with this,
some of my records are empty which of course leaves an
empty spot which is what i want. when i have the DB Wiz
displaying all this on a page, it leaves a space where
that record is empty. I want it to just list the records
with info in it and not the blank ones which leave a
gap. how do i do this? Thanks!

Rerun the DRW and:

1. On page 3, click More Options.
2. Click Criteria.
3. Click Add.
4. Set Field Name to your field name.
5. Set Comparison to Not Null.
6. Click OK, OK, OK, Next, Next, Finish.
7. Save, then test using an http:// URL.

This should solve the problem if, in fact, your database
fields are truly empty. If they actually contain a zero-
length string or the number zero, you'll have to adjust
the comparison in step 5 accordingly.

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

Back
Top