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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Desperate!! Memo field problem

Status
Not open for further replies.

GROOVYHEN

Programmer
Apr 19, 2004
12
GB
If I have a table, with one field a memo type, and I want to fill it with a lengthy review that has paragraphs e.g.
blahblhahgfnbfghgfhbgfhbgfhfgh, gfhgfhggfhfghgf, hgfhfg. ghfghfghfgt.

[new paragraph here by pressing enter twice]hfghfghfg, hfghgfhfgh, jhgjhgjhghjgjgh. hgfhfghgf. hgfhghfhgfhgf. hgfhgfhfghfgh.

how would I be able to save the memo so that the double enter press is saved, so that it would be display as a new paragraph when drawn from another program, such as an ASP web page?

I hope that this is a simple problem to solve. Thanks.
 
I'm not an ASP person so this is just a pointer.

You need to replace vbCrLf with <br> when you are getting the data for your ASP page.
vbCrlf is Chr(13) & chr(10) but I would have thought the intrinsic constant would work with ASP.
 
No, I need to know what to write in the access field (is that the right term?) so that paragraphs are separated. Copying from a text file, in which paragraphs are separated by double-press of enter, doesn't seem to register in Access, or at least, when Access gives it to a ASP page. Do I write in something into the field to adequately separate paragraphs. Perhaps something in brackets?
 
just like lupins46 said:

there is already something in the access field indicating it's a paragraph break. It looks like: ?

What you need to do when you get the query into the ASP page is replace vbCrLf (or Chr(13) & Chr(10) - the ascii codes for carriage return and line feed) with <BR> so the HTML is correct for showing paragraphs

Leslie
 
'to register in Access, or at least, when Access gives it to a ASP page'

These are two different requirements. Access is perfectly happy with vbCRLF as line break. As I said I have very little ASP knowledge but it seems to me the requirements are not compatible.

You have to sort it out on yor ASP page. Something like:

myfield = rs("mymemoField")
Replace(myfield, vbCrLf , "<br>")
response.write myfield




 
I guess the page here didn't like my square character! It was replaced by a '?'?



Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top