PC Review


Reply
Thread Tools Rate Thread

blank spaces in <%asp%> field

 
 
skc
Guest
Posts: n/a
 
      30th Jun 2004
I am using DRW to populate a text box. So in the text box
I am simply putting in <%=variable%> as the value. In my
DRW I am defining my hidden variable as: <%
variable=fp_fieldval(fp_rs,"fieldname")%>.

Trouble is...I am getting a blank space if there is no
value in the database or if the variable has no value. I
have used <%=Trim(variable)%> as the value of the text
box, but I am getting around two/three blank spaces.

How can I get rid of this???

Thanks,

skc
 
Reply With Quote
 
 
 
 
Thomas A. Rowe
Guest
Posts: n/a
 
      30th Jun 2004
Try

<% If fp_rs("fieldname") > " " Then %>
<%=fp_rs("fieldname")%>
<% End If %>

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"skc" <(E-Mail Removed)> wrote in message
news:23b6c01c45eb5$5a63fbd0$(E-Mail Removed)...
> I am using DRW to populate a text box. So in the text box
> I am simply putting in <%=variable%> as the value. In my
> DRW I am defining my hidden variable as: <%
> variable=fp_fieldval(fp_rs,"fieldname")%>.
>
> Trouble is...I am getting a blank space if there is no
> value in the database or if the variable has no value. I
> have used <%=Trim(variable)%> as the value of the text
> box, but I am getting around two/three blank spaces.
>
> How can I get rid of this???
>
> Thanks,
>
> skc



 
Reply With Quote
 
skc
Guest
Posts: n/a
 
      1st Jul 2004
Thomas,

Why the ">" - surely you mean "<>"?

Skc

>-----Original Message-----
>Try
>
><% If fp_rs("fieldname") > " " Then %>
><%=fp_rs("fieldname")%>
><% End If %>
>
>--
>==============================================
>Thomas A. Rowe (Microsoft MVP - FrontPage)
>WEBMASTER Resources(tm)
>http://www.ycoln-resources.com
>FrontPage Resources, WebCircle, MS KB Quick Links, etc.
>==============================================
>To assist you in getting the best answers for FrontPage

support see:
>http://www.net-sites.com/sitebuilder/newsgroups.asp
>
>"skc" <(E-Mail Removed)> wrote in

message
>news:23b6c01c45eb5$5a63fbd0$(E-Mail Removed)...
>> I am using DRW to populate a text box. So in the text

box
>> I am simply putting in <%=variable%> as the value. In

my
>> DRW I am defining my hidden variable as: <%
>> variable=fp_fieldval(fp_rs,"fieldname")%>.
>>
>> Trouble is...I am getting a blank space if there is no
>> value in the database or if the variable has no value.

I
>> have used <%=Trim(variable)%> as the value of the text
>> box, but I am getting around two/three blank spaces.
>>
>> How can I get rid of this???
>>
>> Thanks,
>>
>> skc

>
>
>.
>

 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      1st Jul 2004
Skc,

Which one to use depending on what is stored in the table field and/or what you want to test for.

> " " greater than a space
> "" greater than null

<> "" not equal to null
<> " " not equal to a space

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"skc" <(E-Mail Removed)> wrote in message
news:23ba401c45f3d$dbe358d0$(E-Mail Removed)...
> Thomas,
>
> Why the ">" - surely you mean "<>"?
>
> Skc
>
> >-----Original Message-----
> >Try
> >
> ><% If fp_rs("fieldname") > " " Then %>
> ><%=fp_rs("fieldname")%>
> ><% End If %>
> >
> >--
> >==============================================
> >Thomas A. Rowe (Microsoft MVP - FrontPage)
> >WEBMASTER Resources(tm)
> >http://www.ycoln-resources.com
> >FrontPage Resources, WebCircle, MS KB Quick Links, etc.
> >==============================================
> >To assist you in getting the best answers for FrontPage

> support see:
> >http://www.net-sites.com/sitebuilder/newsgroups.asp
> >
> >"skc" <(E-Mail Removed)> wrote in

> message
> >news:23b6c01c45eb5$5a63fbd0$(E-Mail Removed)...
> >> I am using DRW to populate a text box. So in the text

> box
> >> I am simply putting in <%=variable%> as the value. In

> my
> >> DRW I am defining my hidden variable as: <%
> >> variable=fp_fieldval(fp_rs,"fieldname")%>.
> >>
> >> Trouble is...I am getting a blank space if there is no
> >> value in the database or if the variable has no value.

> I
> >> have used <%=Trim(variable)%> as the value of the text
> >> box, but I am getting around two/three blank spaces.
> >>
> >> How can I get rid of this???
> >>
> >> Thanks,
> >>
> >> skc

> >
> >
> >.
> >



 
Reply With Quote
 
skc
Guest
Posts: n/a
 
      1st Jul 2004
Thomas,

I have tried everything - but I cannot get rid of the
space!!!

Is there a way of doing an onclick event that
automatically gets rid of leading spaces?

skc

>-----Original Message-----
>Skc,
>
>Which one to use depending on what is stored in the table

field and/or what you want to test for.
>
>> " " greater than a space
>> "" greater than null

><> "" not equal to null
><> " " not equal to a space
>
>--
>==============================================
>Thomas A. Rowe (Microsoft MVP - FrontPage)
>WEBMASTER Resources(tm)
>http://www.ycoln-resources.com
>FrontPage Resources, WebCircle, MS KB Quick Links, etc.
>==============================================
>To assist you in getting the best answers for FrontPage

support see:
>http://www.net-sites.com/sitebuilder/newsgroups.asp
>
>"skc" <(E-Mail Removed)> wrote in

message
>news:23ba401c45f3d$dbe358d0$(E-Mail Removed)...
>> Thomas,
>>
>> Why the ">" - surely you mean "<>"?
>>
>> Skc
>>
>> >-----Original Message-----
>> >Try
>> >
>> ><% If fp_rs("fieldname") > " " Then %>
>> ><%=fp_rs("fieldname")%>
>> ><% End If %>
>> >
>> >--
>> >==============================================
>> >Thomas A. Rowe (Microsoft MVP - FrontPage)
>> >WEBMASTER Resources(tm)
>> >http://www.ycoln-resources.com
>> >FrontPage Resources, WebCircle, MS KB Quick Links, etc.
>> >==============================================
>> >To assist you in getting the best answers for FrontPage

>> support see:
>> >http://www.net-sites.com/sitebuilder/newsgroups.asp
>> >
>> >"skc" <(E-Mail Removed)> wrote in

>> message
>> >news:23b6c01c45eb5$5a63fbd0$(E-Mail Removed)...
>> >> I am using DRW to populate a text box. So in the

text
>> box
>> >> I am simply putting in <%=variable%> as the value.

In
>> my
>> >> DRW I am defining my hidden variable as: <%
>> >> variable=fp_fieldval(fp_rs,"fieldname")%>.
>> >>
>> >> Trouble is...I am getting a blank space if there is

no
>> >> value in the database or if the variable has no

value.
>> I
>> >> have used <%=Trim(variable)%> as the value of the

text
>> >> box, but I am getting around two/three blank spaces.
>> >>
>> >> How can I get rid of this???
>> >>
>> >> Thanks,
>> >>
>> >> skc
>> >
>> >
>> >.
>> >

>
>
>.
>

 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      1st Jul 2004
If you have leading or trailing spaces, do the following

<%=Trim(fp_rs("fieldname"))%>

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"skc" <(E-Mail Removed)> wrote in message
news:241a501c45f56$93dbac90$(E-Mail Removed)...
> Thomas,
>
> I have tried everything - but I cannot get rid of the
> space!!!
>
> Is there a way of doing an onclick event that
> automatically gets rid of leading spaces?
>
> skc
>
> >-----Original Message-----
> >Skc,
> >
> >Which one to use depending on what is stored in the table

> field and/or what you want to test for.
> >
> >> " " greater than a space
> >> "" greater than null

> ><> "" not equal to null
> ><> " " not equal to a space
> >
> >--
> >==============================================
> >Thomas A. Rowe (Microsoft MVP - FrontPage)
> >WEBMASTER Resources(tm)
> >http://www.ycoln-resources.com
> >FrontPage Resources, WebCircle, MS KB Quick Links, etc.
> >==============================================
> >To assist you in getting the best answers for FrontPage

> support see:
> >http://www.net-sites.com/sitebuilder/newsgroups.asp
> >
> >"skc" <(E-Mail Removed)> wrote in

> message
> >news:23ba401c45f3d$dbe358d0$(E-Mail Removed)...
> >> Thomas,
> >>
> >> Why the ">" - surely you mean "<>"?
> >>
> >> Skc
> >>
> >> >-----Original Message-----
> >> >Try
> >> >
> >> ><% If fp_rs("fieldname") > " " Then %>
> >> ><%=fp_rs("fieldname")%>
> >> ><% End If %>
> >> >
> >> >--
> >> >==============================================
> >> >Thomas A. Rowe (Microsoft MVP - FrontPage)
> >> >WEBMASTER Resources(tm)
> >> >http://www.ycoln-resources.com
> >> >FrontPage Resources, WebCircle, MS KB Quick Links, etc.
> >> >==============================================
> >> >To assist you in getting the best answers for FrontPage
> >> support see:
> >> >http://www.net-sites.com/sitebuilder/newsgroups.asp
> >> >
> >> >"skc" <(E-Mail Removed)> wrote in
> >> message
> >> >news:23b6c01c45eb5$5a63fbd0$(E-Mail Removed)...
> >> >> I am using DRW to populate a text box. So in the

> text
> >> box
> >> >> I am simply putting in <%=variable%> as the value.

> In
> >> my
> >> >> DRW I am defining my hidden variable as: <%
> >> >> variable=fp_fieldval(fp_rs,"fieldname")%>.
> >> >>
> >> >> Trouble is...I am getting a blank space if there is

> no
> >> >> value in the database or if the variable has no

> value.
> >> I
> >> >> have used <%=Trim(variable)%> as the value of the

> text
> >> >> box, but I am getting around two/three blank spaces.
> >> >>
> >> >> How can I get rid of this???
> >> >>
> >> >> Thanks,
> >> >>
> >> >> skc
> >> >
> >> >
> >> >.
> >> >

> >
> >
> >.
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How to Delete Blank Spaces in a Field? Rob Microsoft Access Database Table Design 0 5th Jun 2008 03:35 AM
StartOf search for field with blank spaces mbc04@nc.rr.com Microsoft Access Queries 4 5th Mar 2007 09:45 PM
query with blank spaces in field names =?Utf-8?B?azJzYXJhaA==?= Microsoft Access Queries 3 25th Nov 2005 08:07 PM
How do I remove blank spaces in a text field? =?Utf-8?B?QWRtaW4gTWF0dA==?= Microsoft Access Queries 2 17th Nov 2005 03:13 PM
Drop blank spaces at the end of a field =?Utf-8?B?U3RlcGhhbmllIERvYnNvbg==?= Microsoft Access Queries 1 21st Jul 2005 07:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:50 AM.