Database results and forms

S

Stu

I have a form that submits to a database. I use these
results to generate formatted pages for viewing. I have a
description field that is a scrolling text box where you
can Use the enter button to jump down a line within the
scrolling text box field like so:

Item 1
Item 2
Item 3

instead of letting it just wrap like this:

Item 1 Item 2 Item 3

When you use this option it puts the text in the database
field stacked like the first example.

The problem I'm having is when I go to display this
stacked text on the results page, it's no longer stacked,
it just all runs together like my second example.

How can I make the results form recogonize the returns
withing the field?

I also have an update page in .asp that can edit the
database, but when I try to edit a page it will only allow
me to add 22 lines within one scrolling text box, anything
with more than that many lines will not submit. Do you
know why it stops at 22 lines and can I raise this number
somehow?

thanks,

Stu
 
J

Jim Buyens

If you do View Source on the results page, I think you'll
find that the carriage returns are still present. The
browser justs ignore them (as it does all other carriage
returns).

To fix this, you need to create a custom query that
changes carriage returns in the data to <br> tags. For
example:

SELECT Replace([msgbody], chr(13) , '<br>') as fmtbody ...

rather than

SELECT msgbody, ...

As to editing more than 22 lines of text in a scrolling
text box, I'm not aware of any specific restriction in
that regard. What kind of error do you receive, and when?

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*==========----------
|\=======--------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/=======--------
*==========----------
 
S

Stu

Well Jim,
Here is what the code looks like on the results page for
the list:

<TD WIDTH="310"><FONT SIZE="2" FACE="Arial">
High Temp and Low Temp Alarm - Internal Bimetal Alarm
Door Alarm Switches - Internal Push-in Door Alarm
Alarm Harness- Custom alarm harness
Ground Bar, 10 Pos. Dual lug 5/8 x 5/8 spacing
Base Plinth - Enclosure bottom supportRoxtec M63 Port
2 AWG Battery Connection Cables</FONT></TD>

I don't see any carriage returns unless they do not have a
symbol. Here is my "select Statement" on the results page
in Frontpage:

fp_sQry="SELECT * FROM Results WHERE (salesperson
LIKE 'Brad%' AND ID = ::quotenumber::)"

I'm not sure if I understand what to change in this code
or if this is even the right code to change.

As far as the 22 lines are concerned, the list I"m
experimenting with has 28 lines and it works fine when you
submit in the form, but when I go to the editing page it
will not let me update the database with 28 lines in that
field. I don't get an error, it just doesn't submit or do
anything when I push the submit button. Here is a sample
of the code for that page:

<%
ID = Request.QueryString( "ID")
if ID ="" then ID ="1"

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open "DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=C:\Inetpub\243\fpdb\quote_form.mdb"

quote = "SELECT * FROM Results Where ID = "& ID &""
Set quote = Conn.Execute( quote)

%>

and here is the code for the field that I would like to
put more than 22 lines in:

<tr>
<td width="155" align="right" height="32"><b><font
size="2" face="Arial">Description 1:</font></b></td>
<td width="344" valign="top"><font face="Arial"
size="2" color="#008000">
<textarea rows="4" name="description0" cols="80"><%
=quote("description0") %></textarea></font></td>
</tr>

If you can help, I would appreciate it!

thanks,

Stu

-----Original Message-----
If you do View Source on the results page, I think you'll
find that the carriage returns are still present. The
browser justs ignore them (as it does all other carriage
returns).

To fix this, you need to create a custom query that
changes carriage returns in the data to <br> tags. For
example:

SELECT Replace([msgbody], chr(13) , '<br>') as fmtbody ...

rather than

SELECT msgbody, ...

As to editing more than 22 lines of text in a scrolling
text box, I'm not aware of any specific restriction in
that regard. What kind of error do you receive, and when?

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*==========----------
|\=======--------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/=======--------
*==========----------


-----Original Message-----
I have a form that submits to a database. I use these
results to generate formatted pages for viewing. I have a
description field that is a scrolling text box where you
can Use the enter button to jump down a line within the
scrolling text box field like so:

Item 1
Item 2
Item 3

instead of letting it just wrap like this:

Item 1 Item 2 Item 3

When you use this option it puts the text in the database
field stacked like the first example.

The problem I'm having is when I go to display this
stacked text on the results page, it's no longer stacked,
it just all runs together like my second example.

How can I make the results form recogonize the returns
withing the field?

I also have an update page in .asp that can edit the
database, but when I try to edit a page it will only allow
me to add 22 lines within one scrolling text box, anything
with more than that many lines will not submit. Do you
know why it stops at 22 lines and can I raise this number
somehow?

thanks,

Stu
.
.
 

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

Top