Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

close space between lines

Status
Not open for further replies.

meltingpot

Technical User
May 11, 2004
118
GB
The code below writes a name and address but I have a problem with the spaces. As an example If the field "Add3" is missing it leaves a space on the page. How do I make the lines close up if a field is empty ???


Code =======================
<td width="366"><%=(Course_accepted.Fields.Item("Unit").Value)%><br>
<%=(Course_accepted.Fields.Item("Add1").Value)%><br>
<%=(Course_accepted.Fields.Item("Add2").Value)%><br>
<%=(Course_accepted.Fields.Item("Add3").Value)%><br>
<%=(Course_accepted.Fields.Item("add4").Value)%><br>
<%=(Course_accepted.Fields.Item("County").Value)%><br>
<%=(Course_accepted.Fields.Item("postcode").Value)%><br>
<br></td>

Help !
 
Personally I have no problem with:
Code:
' Check if value is an empty string or null (force to string with concatenation)
if (Course_accepted.Fields.Item("Unit").Value & "") <> "" then

As long as it is maintainable (or easily replaceable) for the next perons (or myself, 6 months later with no clue what i was doing) then it is good. Well, with the additional caveat that it can't introduce additional work for the system :p

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top