![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi I have a Memo field with customers names and addresses I would like to write code to make the following happen MR JOE SAMPLE 1 THE HIGH STREET BIDCHESTER SOMERSET TN8 6TY MR JOE SAMPLE<br 1 THE HIGH STREET<br BIDCHESTER<br SOMERSET<br TN8 6TY<br I think it is the Instr function but I am getting nowhere fast Can anyone help. Thanks |
#3
| |||
| |||
|
|
Hi I have a Memo field with customers names and addresses I would like to write code to make the following happen MR JOE SAMPLE 1 THE HIGH STREET BIDCHESTER SOMERSET TN8 6TY MR JOE SAMPLE<br 1 THE HIGH STREET<br BIDCHESTER<br SOMERSET<br TN8 6TY<br I think it is the Instr function but I am getting nowhere fast Can anyone help. Thanks |
#4
| |||
| |||
|
|
On Fri, 4 Feb 2011 04:54:47 -0800 (PST), bobdydd reallyuseful2... (AT) yahoo (DOT) co.uk> wrote: Hi I have a Memo field with customers names and addresses I would like to write code to make the following happen MR JOE SAMPLE 1 THE HIGH STREET BIDCHESTER SOMERSET TN8 6TY MR JOE SAMPLE<br 1 THE HIGH STREET<br BIDCHESTER<br SOMERSET<br TN8 6TY<br I think it is the Instr function but I am getting nowhere fast Can anyone help. Thanks You don't actually need InStr, just Replace: UPDATE table SET memofield = Replace([memofield], Chr(13) & Chr(10), "<br>") will find all instances of a carriage-return new-line pair and replace them with the text string <br>. Use "<br>" & Chr(13) & Chr(10) if you want to retain both the html tag and the actual new-line pair. -- * * * * * * *John W. Vinson [MVP] *Microsoft's replacements for these newsgroups: *http://social.msdn.microsoft.com/For...-US/accessdev/ *http://social.answers.microsoft.com/.../en-US/addbuz/ *and see alsohttp://www.utteraccess.com |
#5
| |||
| |||
|
|
* * * * * * *John W. Vinson [MVP] |
![]() |
| Thread Tools | |
| Display Modes | |
| |