|
 |
access_asp thread: create empty cell
Message #1 by Ping Li <pli@l...> on Tue, 11 Dec 2001 15:38:09 -0600
|
|
hi, everybody,
In response.write RS.GetString (,,"</td><td
align=center>","</td></tr><tr><td
align=center>", "N/A"), I can use "N/A" to add an empty cell when no data
exists in database. But does anybody know how to add an empty cell using the
following method? Thanks for your help. Ping
do while not RS.eof
response.write _
"<tr align=center>" &_
" <td> " & RS("fields") & "</td>" & _
" </tr>"
Message #2 by "Zee Computer Consulting" <zee@t...> on Tue, 11 Dec 2001 19:20:25 -0800
|
|
Use a non-breaking space if the field is empty:
' Get the value of this field
ThisFieldValue = RS("fields")
' Check for empty field
IF len(trim(ThisFieldValue)) = 0 THEN
' Use nonbreaking space
ThisFieldValue = " "
END IF
' Output field
Response.Write( "<td>" & ThisFieldValue & "</td>" )
-- Z
----- Original Message -----
From: "Ping Li" <pli@l...>
To: "Access ASP" <access_asp@p...>
Sent: Tuesday, December 11, 2001 1:38 PM
Subject: [access_asp] create empty cell
> hi, everybody,
>
> In response.write RS.GetString (,,"</td><td
> align=center>","</td></tr><tr><td
> align=center>", "N/A"), I can use "N/A" to add an empty cell when no data
> exists in database. But does anybody know how to add an empty cell using
the
> following method? Thanks for your help. Ping
>
> do while not RS.eof
> response.write _
> "<tr align=center>" &_
> " <td> " & RS("fields") & "</td>" & _
> " </tr>"
>
>
>
$subst('Email.Unsub').
Message #3 by Ping Li <pli@l...> on Mon, 17 Dec 2001 11:39:16 -0600
|
|
Zee,
How can I change the value of ThisFieldValue = " " to "n/a" or other
words?
Thanks.
Ping
-----Original Message-----
From: Zee Computer Consulting [mailto:zee@t...]
Sent: Tuesday, December 11, 2001 9:20 PM
To: Access ASP
Subject: [access_asp] Re: create empty cell
Use a non-breaking space if the field is empty:
' Get the value of this field
ThisFieldValue = RS("fields")
' Check for empty field
IF len(trim(ThisFieldValue)) = 0 THEN
' Use nonbreaking space
ThisFieldValue = " "
END IF
' Output field
Response.Write( "<td>" & ThisFieldValue & "</td>" )
-- Z
----- Original Message -----
From: "Ping Li" <pli@l...>
To: "Access ASP" <access_asp@p...>
Sent: Tuesday, December 11, 2001 1:38 PM
Subject: [access_asp] create empty cell
> hi, everybody,
>
> In response.write RS.GetString (,,"</td><td
> align=center>","</td></tr><tr><td
> align=center>", "N/A"), I can use "N/A" to add an empty cell when no data
> exists in database. But does anybody know how to add an empty cell using
the
> following method? Thanks for your help. Ping
>
> do while not RS.eof
> response.write _
> "<tr align=center>" &_
> " <td> " & RS("fields") & "</td>" & _
> " </tr>"
>
>
>
$subst('Email.Unsub').
|
|
 |