M
MJ
This may not be as complex as it seems to me, but I am trying to determine
how much of a problem I may have in one of my databases.
The core of the problem starts when my users cut & paste email responses
into the comment fields that contain CR & LFs. It would not be a big deal
except that these comment fields get output to a text file for uploading to
another database external to mine and it does not handle the CR & LFs.
My predecessor wrote code to strip out CR & LF combinations:
If (Not IsNull(Me.Comment#) Then
Me.Comment#= Replace([Comment#, Chr(13) & Chr(10), " ")
End If
but I am still running into CR & LFs within the comment fields after this
code runs.
I need to determine how many CRs + LFs [ chr(13) & chr(10) ] are remaining
within two comment fields of my database. I want to produce a list
containing the Record Numbers (RecordNum) plus a count of the number of times
[ chr(13) & chr(10) ] occcurs within the Comment* fields
(TblConcern) RecordNum Comment1 Comment2
001
002
003
...
EXAMPLE
OUTPUT RecordNum CntCmnt1 CntCmnt2
005 1 1
020 2
103 3
...
1) How best to write a query to give me this assessment tool?
2) Is my predecessor's code the most correct code to take care of the CR &
LF issue within these comment fields? If not, what would be a better code?
Thanks in advance,
MJ
how much of a problem I may have in one of my databases.
The core of the problem starts when my users cut & paste email responses
into the comment fields that contain CR & LFs. It would not be a big deal
except that these comment fields get output to a text file for uploading to
another database external to mine and it does not handle the CR & LFs.
My predecessor wrote code to strip out CR & LF combinations:
If (Not IsNull(Me.Comment#) Then
Me.Comment#= Replace([Comment#, Chr(13) & Chr(10), " ")
End If
but I am still running into CR & LFs within the comment fields after this
code runs.
I need to determine how many CRs + LFs [ chr(13) & chr(10) ] are remaining
within two comment fields of my database. I want to produce a list
containing the Record Numbers (RecordNum) plus a count of the number of times
[ chr(13) & chr(10) ] occcurs within the Comment* fields
(TblConcern) RecordNum Comment1 Comment2
001
002
003
...
EXAMPLE
OUTPUT RecordNum CntCmnt1 CntCmnt2
005 1 1
020 2
103 3
...
1) How best to write a query to give me this assessment tool?
2) Is my predecessor's code the most correct code to take care of the CR &
LF issue within these comment fields? If not, what would be a better code?
Thanks in advance,
MJ