shhhhhoooore!
this is untested, but this is something that should work, it's not the cleanest.
dim mystring as string
dim mydb as database
dim myrecord as recordset
set mydb = currentdb()
set myrecord = db.openrecordset("mytable/query"
if myrecord.bof = true then exit sub
with myrecord
if .recordcount then
.movefirst
do until myrecord.eof
mystring = !myfield
'object is to find the character, then build a new string using left, add a space, then right - 1 (b/c we took out the crlf) You might want to use variables to simplify this, it's rough on the eyes.
if instr(1, mystring, char(10), 0) then
mystring = left(mystring, instr(1, mystring, char(10), 0) & " " & right(mystring, len(mystring - instr(1, mystring, char(10), 0) - 1)
else if instr(1, mystring, char(13), 0) then
mystring = left(mystring, instr(1, mystring, char(10), 0) & " " & right(mystring, len(mystring - instr(1, mystring, char(13), 0) - 1)
else if instr(1, mystring, vbcrlf, 0) then
mystring = left(mystring, instr(1, mystring, vbcrlf, 0) & " " & right(mystring, len(mystring - instr(1, mystring, char(10), 0) - 1)
end if
.edit
!myfield = mystring
.update
loop
end if
end with
set myrecord = nothing
set my db = nothing
'have a nice day, i suggest testing this before using it ;-)
Cruz'n and Booz'n always.
This post shows what little I do at work.